Skip to content
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

[Vertex AI] Add CustomNSError conformance to BackendError #14029

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Nov 5, 2024

Added CustomNSError conformance to BackendError. This improves the string returned by localizedDescription and will also improve interoperability with Crashlytics (e.g., when reporting non-fatal errors, logged errors are grouped by domain and code).

Example - calling error.localizedDescription in testGenerateContent_failure_invalidAPIKey():

  • Before: The operation couldn’t be completed. (FirebaseVertexAI.BackendError error 1.)
  • Now: "API key not valid. Please pass a valid API key. (com.google.firebase.vertexai.BackendError - HTTP 400 INVALID_ARGUMENT)"

#no-changelog

@andrewheard andrewheard added this to the 11.5.0 - M156 milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant