Error response contract #4834
-
Hi. Is it possible to get errors from LiteLLM in structured JSON format like OpenAI providers do? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @repko-artem - yes our goal is to have structured JSON exceptions. Could you share the stacktrace you're seeing. I'll fix it |
Beta Was this translation helpful? Give feedback.
-
@ishaan-jaff Hi. Your response has error code of int type:
But Betalgo expects string code: And we're getting exception:
How do you think who is right?) Should error code be string or int? UpdateIf we look on official python OpenAI lib, the code should be a string: |
Beta Was this translation helpful? Give feedback.
Started an issue for this @repko-artem, #4970
Will push a fix today :)