Skip to content
Snippets Groups Projects
Commit 1d4cd5fb authored by James Calfee's avatar James Calfee Committed by Tim
Browse files

Catch and report image upload network errors #185

parent 44ff332b
No related branches found
No related tags found
No related merge requests found
...@@ -427,6 +427,11 @@ function* uploadImage({payload: {file, dataUrl, filename = 'image.txt', progress ...@@ -427,6 +427,11 @@ function* uploadImage({payload: {file, dataUrl, filename = 'image.txt', progress
const {url} = res const {url} = res
progress({url}) progress({url})
}) })
.catch(error => {
console.error(filename, error)
progress({error: 'Unable to contact the server.'})
return
})
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment