Skip to content

Commit

Permalink
fix: Adds console error message when Storage.put fails.
Browse files Browse the repository at this point in the history
Writes an additional error message to the console when an error occurs
during the upload of an image to the S3 bucket. This might help debug
issues that don't provide much information in the error message, suck as
"Network Error"
  • Loading branch information
neomorphic committed Feb 6, 2025
1 parent 92c46f5 commit 9c58ae4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/SearchUpload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ function uploadToS3(upload, handleUpload) {
handleUpload(upload);
upload.onSuccess(result);
})
.catch((e) => upload.onError(e));
.catch((e) => {
console.error(e)
upload.onError(e)
});
});
}

Expand Down

0 comments on commit 9c58ae4

Please sign in to comment.