Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Handle additional error case #604

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 5, 2018

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.

Gracefully handle case where fetch raises an exception with response undefined.
@codecov-io
Copy link

Codecov Report

Merging #604 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0a259c...cdc9b84. Read the comment docs.

@@ -56,6 +56,13 @@ export default class Client {
return callback(error);
})
.catch(() => {
if (!response) {
return callback({
code: 418,
Copy link

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?

Copy link
Author

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?

Copy link
Contributor

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?

@nidsharm nidsharm added needs-feedback PR responses needs-review Used as a label in order to review open PRs labels Oct 22, 2018
@elorzafe
Copy link
Contributor

@charlesbullis thanks for your PR, this issue was solve with PR #706

Thanks again!

@elorzafe elorzafe closed this Nov 16, 2018
@ghost ghost removed the needs-review Used as a label in order to review open PRs label Nov 16, 2018
@github-actions
Copy link

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 *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-feedback PR responses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants