diff options
author | Joas Schilling <coding@schilljs.com> | 2020-07-08 11:24:29 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-07-08 11:24:29 +0200 |
commit | d9f12977d349a1cfd1b2f662b6e8e2ad861c8bbb (patch) | |
tree | 55b086cc9135eb7200ba97d52ceb9503a1194a77 /apps/files_sharing/src/mixins/ShareRequests.js | |
parent | 7a92113fec0c2c02dec7a06ecadcf37d7a14c6da (diff) | |
download | nextcloud-server-d9f12977d349a1cfd1b2f662b6e8e2ad861c8bbb.tar.gz nextcloud-server-d9f12977d349a1cfd1b2f662b6e8e2ad861c8bbb.zip |
Improve error reporting on sharing errors
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing/src/mixins/ShareRequests.js')
-rw-r--r-- | apps/files_sharing/src/mixins/ShareRequests.js | 6 |
1 files changed, 4 insertions, 2 deletions
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) } }, }, |