Skip to content

Commit 0201387

Browse files
nickvergessenbackportbot[bot]
authored andcommitted
Improve error reporting on sharing errors
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 72b59cb commit 0201387

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/files_sharing/src/mixins/ShareRequests.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ export default {
9999
return true
100100
} catch (error) {
101101
console.error('Error while updating share', error)
102-
OC.Notification.showTemporary(t('files_sharing', 'Error updating the share'), { type: 'error' })
102+
if (error.response.status !== 400) {
103+
OC.Notification.showTemporary(t('files_sharing', 'Error updating the share'), { type: 'error' })
104+
}
103105
const message = error.response.data.ocs.meta.message
104-
throw new Error(`${Object.keys(properties)}, ${message}`)
106+
throw new Error(message)
105107
}
106108
},
107109
},

0 commit comments

Comments
 (0)