forked from google-gemini/generative-ai-android
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new error for disabled service, with test (google-gemini#148)
Co-authored-by: David Motsonashvili <[email protected]>
- Loading branch information
1 parent
4f2d1f8
commit fde20cc
Showing
5 changed files
with
51 additions
and
3 deletions.
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 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
27 changes: 27 additions & 0 deletions
27
common/src/test/resources/golden-files/unary/failure-service-disabled.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"error": { | ||
"code": 403, | ||
"message": "Firebase ML API has not been used in project 12345 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/firebaseml.googleapis.com/overview?project=12345 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", | ||
"status": "PERMISSION_DENIED", | ||
"details": [ | ||
{ | ||
"@type": "type.googleapis.com/google.rpc.Help", | ||
"links": [ | ||
{ | ||
"description": "Google developers console API activation", | ||
"url": "https://console.developers.google.com/apis/api/firebaseml.googleapis.com/overview?project=12345" | ||
} | ||
] | ||
}, | ||
{ | ||
"@type": "type.googleapis.com/google.rpc.ErrorInfo", | ||
"reason": "SERVICE_DISABLED", | ||
"domain": "googleapis.com", | ||
"metadata": { | ||
"service": "firebaseml.googleapis.com", | ||
"consumer": "projects/12345" | ||
} | ||
} | ||
] | ||
} | ||
} |