-
Notifications
You must be signed in to change notification settings - Fork 268
feat: New error handling APIs #342
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
Conversation
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.
LGTM! I left a few minor comments.
} | ||
|
||
// IsAborted checks if the given error was due to a concurrency conflict, such as a | ||
// read-modify-write conflict. |
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.
Should we elaborate that this has additional information to identify an ABORTED
condition? The description is the same as in the IsConflict()
otherwise.
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.
I think this is ok. Those 2 error conditions are mutually exclusive in practice. An API may either throw CONFLICT or ABORTED, but never both.
* fix: Error handling revamp basic structure * Added more documentation and tests * Updated docs * Exhaustive unit tests; Updated integration test * Fixed some typos in comments * Renamed function in comment
* Renamed WebpushFcmOptions to WebpushFCMOptions (#334) * Added modules support; Added semantic import versioning (#336) * feat: New error handling APIs (#342) * fix: Error handling revamp basic structure * Added more documentation and tests * Updated docs * Exhaustive unit tests; Updated integration test * Fixed some typos in comments * Renamed function in comment * FCM error handling revamp (#343) * FCM error handling revamp * Updated unit tests * RTDB error handling revamp (#345) * Error handling revamp of Auth APIs (#348) * Error handling revamp for Auth APIs * Minor code clean up * Error handling support in the token verification APIs (#349) * New error handling scheme for token verification APIs * Make InvalidToken condition conjunctive * Removing deprecated HTTP and error handling utils (#350) * Removed deprecated APIs from internal * Made HasSuccessStatus the default error checking function * Added unit test for error response handling * Handling timeouts, connection and other network errors (#353) * Handling timeouts, connection and other network errors * Handling wrapped errors * Updated comment * Apply suggestions from code review * Removing old release workflow files * Removing an erroneous import * Fixed bad merge * Fixed failing test due to old dependency * chore: Updated release flow for modules support (#378) * chore: Updated release flow for modules support * Fixed failing unit test * Removed GOPATH from release workflow
Implements the new error handling APIs proposed at go/firebase-error-handling-go.
errorutils
package which exposes the platform error handling functions.internal/http_client.go
for handling OnePlatform and other HTTP errors.iid
package to use the new error handling mechanism. I've deprecated the error handling functions currently present in theiid
package, and pointed them to the new ones introduced inerrorutils
.go/firebase-error-handling-go