-
Notifications
You must be signed in to change notification settings - Fork 152
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
Error handling for missing/wrong API key #89
Comments
Thanks for your feedback, @Jerry23011 and @tisfeng! I agree that this error being buried in
I personally like the last option of a specific case for common errors like this one. I think many developers are likely to run into either Will discuss with my USA-based colleagues tomorrow (Martin Luther King Jr. Day there today). It's late in Europe but @peterfriese might have opinions too. |
We're glad you're listening to us, and we'd like to make sure that users get clear descriptions of the errors they're getting when they request an error with Gemini, rather than vague, useless information that might otherwise come back and accuse us of having a bad experience with the app (or with Gemini). We'd love it if you'd make sure to handle all kinds of error types, like this #85, and provide clear descriptive information. If can't, we hope you'll make the error information publicly available so that we can handle it ourselves. |
Thanks, @tisfeng, we definitely appreciate you letting us know about the pain points you're running into -- I'm sure you aren't the only devs with the same questions. Since this issue is similar, I added an example in #82 (comment) of the pain points I ran into when trying to catch a |
Thanks for the reply, I see, seems like using Looking forward to the improvements in the later new version. |
@andrewheard Hi, how is this issue going? |
Sorry the delay, @tisfeng. I just published https://github.com/google/generative-ai-swift/releases/tag/0.4.7, which adds an Will close this issue but feel free to re-open if you find this solution doesn't meet your needs. |
Thank you @andrewheard |
I still think this issue was closed prematurely. I'd like to access the RPCError message for the use cases that are not covered in
|
Description of the bug:
I noticed error handling for unsupportedUserLocation is improved in #85, we also encountered other error types such as API key not valid.
Is it possible to add this case to the package, too?
Actual vs expected behavior:
No response
Any other information you'd like to share?
We're thinking if it is possible to expose RPCError type in Error.swift so that we can call it directly and fetch the error message?
The text was updated successfully, but these errors were encountered: