You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading the docs I can't find a section where specifies the possible API error codes, in the examples/references it would be helpful to know what are the possible errors the API can return for error handling.
I hope this can be implemented, thanks!.
The text was updated successfully, but these errors were encountered:
Especially some info about how to handle the SAFETY errors. Right now I'm just filtering for the word SAFETY in the error response to handle that case as a warning. There must be a better way than this though.
I tried to do something like this using the typescript vs code hints, but it doesn't always work.
if(response?.promptFeedback?.blockReason==="SAFETY"){// Warning for SAFETY errorslogger.warn(error,response);}else{// Error for all otherslogger.error(error);}
Related, it doesn't appear that I can import GoogleGenerativeAIError so that I can do e instanceof GoogleGenerativeAIError. Also, guidance on how to differentiate errors would be nice. Currently I don't see a way to get the HTTP status code without parsing the message (e.g. [500 Internal Server Error], [503 Service Unavailable]).
Reading the docs I can't find a section where specifies the possible API error codes, in the examples/references it would be helpful to know what are the possible errors the API can return for error handling.
I hope this can be implemented, thanks!.
The text was updated successfully, but these errors were encountered: