How to get http error code? #229
-
Hi, Thank you for this great library. Is there a way to get openai api http error code? I'd like to handle 401 error with a special logic to retrieve a new api key from other microservice. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @jingglang thanks for using simple-openai and for identifying this missing functionality. Currently there is no easy way to get it. I was thinking of adding it as part of the #98 but at this point I guess this could be developed in advance. I'm going to create a Github issue for this topic. |
Beta Was this translation helpful? Give feedback.
-
@jingglang The release 3.11.0 has been deployed and it includes exception handling. |
Beta Was this translation helpful? Give feedback.
The new issue is #230