Commit 102cb769 authored by anton's avatar anton
Browse files

Refuse to add media when metadata request fails

parent 0b76cfa0
......@@ -125,7 +125,8 @@ export default {
remove_invitation_failed: 'Failed to remove invitation: {error}',
add_media_forbidden: 'You are not allowed to add media to this Timeline.',
editing_forbidden: 'You are not allowed to edit this item.',
annotate_timeline_forbidden: 'You are not allowed to annotate this Timeline.'
annotate_timeline_forbidden: 'You are not allowed to annotate this Timeline.',
media_could_not_be_accessed: 'The supplied media URL could not be accessed.'
},
labels: {
rejected: 'Rejected.',
......
......@@ -89,7 +89,13 @@
},
submit: {
async handler () {
await _this.fetchMetadata()
try {
await _this.fetchMetadata()
}
catch (err) {
if (err.message === 'ENOENT') throw new Error('errors.media_could_not_be_accessed')
else throw err
}
let
start = _this.selectorValue,
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment