From d9f12977d349a1cfd1b2f662b6e8e2ad861c8bbb Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 8 Jul 2020 11:24:29 +0200 Subject: Improve error reporting on sharing errors Signed-off-by: Joas Schilling --- apps/files_sharing/src/mixins/ShareRequests.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/files_sharing/src/mixins/ShareRequests.js') diff --git a/apps/files_sharing/src/mixins/ShareRequests.js b/apps/files_sharing/src/mixins/ShareRequests.js index bdc9a566a17..caae4fa4481 100644 --- a/apps/files_sharing/src/mixins/ShareRequests.js +++ b/apps/files_sharing/src/mixins/ShareRequests.js @@ -99,9 +99,11 @@ export default { return true } catch (error) { console.error('Error while updating share', error) - OC.Notification.showTemporary(t('files_sharing', 'Error updating the share'), { type: 'error' }) + if (error.response.status !== 400) { + OC.Notification.showTemporary(t('files_sharing', 'Error updating the share'), { type: 'error' }) + } const message = error.response.data.ocs.meta.message - throw new Error(`${Object.keys(properties)}, ${message}`) + throw new Error(message) } }, }, -- cgit v1.2.3