Is there a way to customize errors returned from K...
# talk-kratos
n
Is there a way to customize errors returned from Kratos? I'm trying some edge cases on the recovery flow, and some errors such as this one just don't feel very user friendly.
w
There are error codes in the go code. My team has localized / custom language for each code
My team is on a much older version (make sure you match the rep tag to your kratos version). This might not be every code but we have some switches for basically all of these https://github.com/ory/kratos/blob/a9f6b7f6addfa3001c4cb9b2753c0ca355c2cce5/text/id.go#L92
s
there is also a docs page (autogenerated from the code): https://www.ory.sh/docs/kratos/concepts/ui-user-interface#machine-readable-format there you find all message/error IDs, default texts, and context values so that you can build your own messages