-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Clean up API error-distinguishing logic #4896
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
16b044c
api errors [nfc]: Simplify logic in the well-formed case.
gnprice 2f4db11
api errors: On 5xx response, don't try to interpret JSON.
gnprice 23f9c9e
api errors [nfc]: Give ApiError some more helpful jsdoc.
gnprice 9b0cf23
api errors [nfc]: Mark ApiError's properties as read-only.
gnprice e62f600
api errors: Make a distinct ServerError class, and Server5xxError.
gnprice a53795b
api errors tests: Update now that ApiError is never 5xx.
gnprice 9c59f90
api errors [nfc]: Add RequestError as base class.
gnprice b74bf2f
api errors: Fix "HTTP status" terminology in an error message.
gnprice be8ac20
api errors: Make a distinct MalformedResponseError class.
gnprice f27fe03
api errors: Put HTTP status in message for MalformedResponseError.
gnprice 0986397
api errors [nfc]: Call `makeErrorFromApi` sooner.
gnprice f2fdedc
api errors: Rename a bit of the Sentry breadcrumb.
gnprice 13d6838
api errors [nfc]: Rely on error object in logging code.
gnprice a4321b7
logging: Add `logging.info`, below "warn" and "error".
gnprice 275a703
api errors: Throw an exception to reach logging code.
gnprice 0595a40
api errors [nfc]: Unpack `response.ok` in terms of status.
gnprice 4ef0f06
api types [nfc]: Make a bogus `empty` explicit.
gnprice a870379
api errors [nfc]: Put success and failure logic together.
gnprice 21c4b03
api errors: Add NetworkError.
gnprice fb632bb
api errors [nfc]: Make the 2xx-yet-no-JSON case explicit.
gnprice 05cef99
api errors: Add UnexpectedHttpStatusError.
gnprice fb5cd6e
api errors [nfc]: Simplify isClientError.
gnprice fad6ddb
api errors [nfc]: Inline away isClientError.
gnprice f5b956e
api types: Fix an ApiResponse to ApiResponseSuccess.
gnprice 3a6be04
api types: Make ApiResponse an inexact object type.
gnprice a400d5f
api types [nfc]: Say $Exact<…> when spreading ApiResponseSuccess.
gnprice a56287b
api types: Make ApiResponseSuccess an inexact object type.
gnprice 3756025
api types: Mark ApiResponse and friends as read-only.
gnprice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Yeah; it'll be nice to get facebook/react-native@6651b7c59, looks like in RN v0.65.
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.
Ah indeed, neat!