Hey, I am using Ory Kratos and I'm wondering what is the recommended way to handle errors in the browser. I see in the self-service UI node examples that it is pretty common to have a handler for flow errors, but in some examples, they use the error IDs and others use the HTTP response codes.
I'm a bit confused on which to use, since I would prefer the IDs, but the git history of some the examples shows that they have moved away from them and some IDs are not documented anywhere (e.g. "self_service_flow_return_to_forbidden"). Also, while the documentation says that there is a field called
id
on the error, it's not present in any of the schemas.
What is the way of going about this?
Edit: Figured out that the error ID is still around, and that the documentation error lies with the error schemas in the HTTP reference. I guess the examples were refactored just to be more generic.