-
Notifications
You must be signed in to change notification settings - Fork 338
Error handling revamp (v3 release) #334
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
* Added the exceptions module * Cleaned up the error handling logic; Added tests * Updated docs; Fixed some typos
* Migrated FCM send APIs to the new error handling regime * Moved error parsing logic to _utils * Refactored OP error handling code * Fixing a broken test * Added utils for handling googleapiclient errors * Added tests for new error handling logic * Updated public API docs * Fixing test for python3 * Cleaning up the error code lookup code * Cleaning up the error parsing APIs * Cleaned up error parsing logic; Updated docs
* Migrated FCM send APIs to the new error handling regime * Moved error parsing logic to _utils * Refactored OP error handling code * Fixing a broken test * Added utils for handling googleapiclient errors * Added tests for new error handling logic * Updated public API docs * Fixing test for python3 * Cleaning up the error code lookup code * Cleaning up the error parsing APIs * Cleaned up error parsing logic; Updated docs * Migrated the FCM IID APIs to the new error types
…302) * Migrated FCM send APIs to the new error handling regime * Moved error parsing logic to _utils * Refactored OP error handling code * Fixing a broken test * Added utils for handling googleapiclient errors * Added tests for new error handling logic * Updated public API docs * Fixing test for python3 * Cleaning up the error code lookup code * Cleaning up the error parsing APIs * Cleaned up error parsing logic; Updated docs * Migrated the FCM IID APIs to the new error types * Migrated custom token API to new error types
* Migrated FCM send APIs to the new error handling regime * Moved error parsing logic to _utils * Refactored OP error handling code * Fixing a broken test * Added utils for handling googleapiclient errors * Added tests for new error handling logic * Updated public API docs * Fixing test for python3 * Cleaning up the error code lookup code * Cleaning up the error parsing APIs * Cleaned up error parsing logic; Updated docs * Migrated the FCM IID APIs to the new error types * Migrated custom token API to new error types * Migrated create cookie API to new error types * Improved error message computation * Refactored the shared error handling code * Fixing lint errors * Renamed variable for clarity
* Added UserNotFoundError type * Fixed some lint errors * Some formatting updates * Updated docs and tests
* New error handling support in create/update/delete user APIs * Fixing some lint errors
* New error handling support in create/update/delete user APIs * Fixing some lint errors * Error handling update in email action link APIs
* Error handling updated for remaining user_mgt APIs * Removed unused constants
* Migrated token verification APIs to new error types * Removed old AuthError type * Added new exception types for revoked tokens
* Migrating db module to new exception types * Error handling for transactions * Updated integration tests * Restoring the old txn abort behavior * Updated error type in snippet * Added comment
* Adding some missing error types * Updated documentation
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.
Thanks Hiranya!
* Added documentation for error codes * Updated API docs
@hiranya911 You mentioned to check the migration guide:
But unfortunately https://firebase.google.com/docs/admin/migrate-admin#admin_go_sdk_300 Am I looking in the wrong place? Thanks |
No idea where you found that link. The right link is https://firebase.google.com/docs/admin/migrate-python-v3 Mentioned correctly at both https://firebase.google.com/support/releases and https://github.com/firebase/firebase-admin-python/releases |
@hiranya911 Thank you so very much, that is what I was looking for:) P.S. The link is one of the first results that pops up in google when you search for firebase admin sdk python migration guide. I know from the link it says go sdk, but when you open it, it has java, go and talks about python (but the content is not there) |
Sorry about that and thanks for bringing it to our attention. Indeed looks like some documentation blunder. I'm working with the docs team to get it resolved asap. |
@hiranya911 not your fault, and not a problem. I am glad now your team is aware of it. |
Merging the changes made in the
error-handling-revamp
branch to themaster
branch.API CHANGE: Python 2.7 support is now deprecated. Developers are advised to use Python 3.4 or higher to run the Admin SDK.
API CHANGE: Removed old module-level exception types
auth.AuthError
,db.ApiCallError
,messaging.ApiCallError
,instance_id.ApiCallError
andproject_management.ApiCallError
.API CHANGE: Added a new
exceptions
module that defines base exception types for the entire SDK. Public APIs now raise exceptions defined in the newexceptions
module (or subtypes of them). This facilitates implementing fine-grained error handling logic for a wide range of scenarios that was not supported before. See the migration guide for instructions on how to port your existing error handling code.API CHANGE: change(auth): It is no longer possible to delete user properties with the
update_user()
API by setting properties toNone
. Setting properties toNone
leaves those properties unchanged. They must be explicitly set toauth.DELETE_ATTRIBUTE
to delete them.API CHANGE: change(fcm): The deprecated
WebpushFcmOptions
type has been removed. Developers must use the PEP8 compliant type nameWebpushFCMOptions
instead.API CHANGE: change(Project Management):
IosApp
,IosAppMetadata
andShaCertificate
types in theproject_management
module have been renamed toIOSApp
,IOSAppMetadata
andSHACertificate
respectively.RELEASE NOTE: fix: Upgraded
google-cloud-firestore
dependency version to to 1.14.0.RELEASE NOTE: fix: Upgraded
google-cloud-storage
dependency version to 1.18.0.