feat: log errorss to consolve when showing error notification (#489)

This commit is contained in:
Vojtech Simetka
2022-07-25 07:26:01 +02:00
committed by GitHub
parent feeca008ac
commit 6bfe97be5d
10 changed files with 12 additions and 0 deletions
+1
View File
@@ -75,6 +75,7 @@ export function Download(): ReactElement {
if (message.includes('Not Found: Not Found')) {
message = 'The specified hash was not found.'
}
console.error(error) // eslint-disable-line
enqueueSnackbar(<span>Error: {message || 'Unknown'}</span>, { variant: 'error' })
} finally {
setLoading(false)
+1
View File
@@ -147,6 +147,7 @@ export function Upload(): ReactElement {
}
})
.catch(e => {
console.error(e) // eslint-disable-line
enqueueSnackbar(`Error uploading: ${e.message}`, { variant: 'error' })
setUploading(false)
})