New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle additional error case #604
Conversation
Gracefully handle case where fetch raises an exception with response undefined.
Codecov Report
@@ Coverage Diff @@
## master #604 +/- ##
=======================================
Coverage 89.27% 89.27%
=======================================
Files 69 69
Lines 3217 3217
Branches 611 611
=======================================
Hits 2872 2872
Misses 328 328
Partials 17 17 Continue to review full report at Codecov.
|
@@ -56,6 +56,13 @@ export default class Client { | |||
return callback(error); | |||
}) | |||
.catch(() => { | |||
if (!response) { | |||
return callback({ | |||
code: 418, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is 418 appropriate for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is not appropriate. Suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol nice! 🍵 Perhaps just a simple 400 works?
@charlesbullis thanks for your PR, this issue was solve with PR #706 Thanks again! |
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Gracefully handle case where fetch raises an exception with response undefined.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.