-
Notifications
You must be signed in to change notification settings - Fork 289
change: New error handling APIs (merging v7 branch into master) #465
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
b269191
Added core types for the error handling revamp (#350)
hiranya911 5e3fd19
Added ErrorHandlingHttpClient API (#353)
hiranya911 a0f29dd
Error handling revamp for the FirebaseMessaging API (#357)
hiranya911 34a6b0a
Merge branch 'master' into v7
hiranya911 c104db6
Error handling revamp for FirebaseInstanceId API (#359)
hiranya911 2a6f45f
fix(auth): Migrated user management APIs to the new error handling sc…
hiranya911 04144f3
Error handling revamp for token verification APIs (#362)
hiranya911 6b7f360
Error handling revamp for the custom token creation API (#366)
hiranya911 5d9ae69
Merged with master
hiranya911 eb32c9c
Error handling revamp for the project management API (#367)
hiranya911 b785e02
Renamed getErrorCodeNew() to getErrorCode() (#379)
hiranya911 d302558
Fixing some deprecation warnings (#380)
hiranya911 d1e21f3
Handling IID error codes correctly (#381)
hiranya911 8128eca
Removed old deprecated APIs (#383)
hiranya911 dcb07a1
fix: Removed unused FirebaseAppStore abstraction (#427)
hiranya911 5dd03b4
chore: Removing redundant test dependency (#441)
hiranya911 be73285
chore: Make user import hashing classes final (#425)
MathBunny 4ff27a7
chore: Merged with v7 branch with master (#456)
hiranya911 c8e9760
fix(fcm): Replacing deprecated Batch API constructor (#460)
hiranya911 9cd38a9
fix: Handling http method override in ErrorHandlingHttpClient (#459)
hiranya911 bd737b5
fix: Handling JSON serialization/response interception at ErrorHandli…
hiranya911 0d3f2d6
feat: Added new error codes for IdP management and multitenancy (#458)
hiranya911 25f57e5
fix: Removing some calls to deprecated APIs (#464)
hiranya911 430f9a8
chore: Support for specifying query parameters in HttpRequestInfo (#463)
hiranya911 04e7038
Merged with master
hiranya911 ca26325
fix: Fixing a series of javadoc warnings (#466)
hiranya911 7d93852
chore: merging with master
hiranya911 ca68566
Merge branch 'v7' of github.com:firebase/firebase-admin-java into v7
hiranya911 b413c7a
fix: Made some APIs on AbstractFirebaseAuth.Builder package-protected…
hiranya911 e079473
Apply suggestions from code review
hiranya911 e5bc796
fix: Minor updates to API ref docs based on code review comments
hiranya911 235181f
fix: Fixing API doc wording
hiranya911 a2698bc
Merge branch 'master' into v7
hiranya911 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/* | ||
* Copyright 2020 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.firebase; | ||
|
||
/** | ||
* Platform-wide error codes that can be raised by Admin SDK APIs. | ||
*/ | ||
public enum ErrorCode { | ||
|
||
/** | ||
* Client specified an invalid argument. | ||
*/ | ||
INVALID_ARGUMENT, | ||
|
||
/** | ||
* Request cannot be executed in the current system state, such as deleting a non-empty | ||
* directory. | ||
*/ | ||
FAILED_PRECONDITION, | ||
|
||
/** | ||
* Client specified an invalid range. | ||
*/ | ||
OUT_OF_RANGE, | ||
|
||
/** | ||
* Request not authenticated due to missing, invalid, or expired OAuth token. | ||
*/ | ||
UNAUTHENTICATED, | ||
|
||
/** | ||
* Client does not have sufficient permission. This can happen because the OAuth token does | ||
* not have the right scopes, the client doesn't have permission, or the API has not been | ||
* enabled for the client project. | ||
*/ | ||
PERMISSION_DENIED, | ||
|
||
/** | ||
* A specified resource is not found, or the request is rejected for unknown reasons, | ||
* such as a blocked network address. | ||
*/ | ||
NOT_FOUND, | ||
|
||
/** | ||
* Concurrency conflict, such as read-modify-write conflict. | ||
*/ | ||
CONFLICT, | ||
|
||
/** | ||
* Concurrency conflict, such as read-modify-write conflict. | ||
*/ | ||
ABORTED, | ||
|
||
/** | ||
* The resource that a client tried to create already exists. | ||
*/ | ||
ALREADY_EXISTS, | ||
|
||
/** | ||
* Either out of resource quota or rate limited. | ||
*/ | ||
RESOURCE_EXHAUSTED, | ||
|
||
/** | ||
* Request cancelled by the client. | ||
*/ | ||
CANCELLED, | ||
|
||
/** | ||
* Unrecoverable data loss or data corruption. The client should report the error to the user. | ||
*/ | ||
DATA_LOSS, | ||
|
||
/** | ||
* Unknown server error. Typically a server bug. | ||
*/ | ||
UNKNOWN, | ||
|
||
/** | ||
* Internal server error. Typically a server bug. | ||
*/ | ||
INTERNAL, | ||
|
||
/** | ||
* Service unavailable. Typically the server is down. | ||
*/ | ||
UNAVAILABLE, | ||
|
||
/** | ||
* Request deadline exceeded. This happens only if the caller sets a deadline that is | ||
* shorter than the method's default deadline (i.e. requested deadline is not enough for the | ||
* server to process the request) and the request did not finish within the deadline. | ||
*/ | ||
DEADLINE_EXCEEDED, | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Intentional dupe?
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.
Yes. These 2 error codes are identical in semantics. We should be able to fold them into one in a future major release.