Recommended way to parse error informations from failing request? #1144
-
I use the Login Flow with Username/Email Password Method. When no data for username/password is transfered I got this error-response (400 - Bad Request):
In the documentation I can see, that the data of this response is structured with the loginFlow schema: https://www.ory.sh/kratos/docs/reference/api/#complete-login-flow-with-usernameemail-password-method The "methods" property is documented as followed:
It seems, that there is no defined structure for the containing data (type of "methods" property is object). So giving the user a hint, why the login failed is very hard, because the structure is not documented and it is possible, that the response for different error cases are structured in different ways. The sdk offers only an ApiException with all the content as a string property. Is there any recommended way to parse the error information? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @jsiedentop, Thank you for reaching out 😄 This documentation might help you with regards to error messages:
Please let me know if this resolves your problem 😃 |
Beta Was this translation helpful? Give feedback.
Hi @jsiedentop,
Thank you for reaching out 😄
This documentation might help you with regards to error messages:
Please let me know if this resolves your problem 😃