Merge pull request #21748 from nextcloud/bugfix/noid/improve-error-reporting-with-sharing

Improve error reporting on sharing errors
This commit is contained in:
Joas Schilling 2020-07-13 11:55:48 +02:00 committed by GitHub
commit d31f5251f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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)
}
},
},