Improve error reporting on sharing errors

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
Joas Schilling 2020-07-08 11:24:29 +02:00 committed by npmbuildbot[bot]
parent 4570534fed
commit c0317e95e0
3 changed files with 6 additions and 4 deletions

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