Exceptions on Error Codes #966
Unanswered
wheresthecode
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Great library! I just wanted to give a suggestion to support throwing exceptions when an API returns non-2** results. FastAPIs can return 422 and the HTTPValidationError type on failure. It would be great if this was handled by the client API throwing an exception. As it is currently implemented all the APIs return Response[MyResult | HTTPValidationError]. Would be great if it always returned Response[MyResult] or just threw an exception. Might also consider just returning MyResult.
Beta Was this translation helpful? Give feedback.
All reactions