few-scooter-86891
09/01/2023, 9:39 AMchilly-king-10285
09/01/2023, 9:39 AMchilly-king-10285
09/01/2023, 9:39 AMjson { id: 1234, text: "Some default text", context: {}, }
The id
is a unique, fixed number that will not change and can be used to translate the message or use your own message content. The text
is a default text in English that you can display if you do not want to customize the message. The context
is a JSON object which may contain additional fields such as expires_at
. This is helpful if you want to craft your own messages. You can find an exemplary error handling logic in the [React.js reference implementation](https://github.com/ory/kratos-react-nextjs-ui/blob/master/pkg/errors.tsx). Additionally, Ory Kratos allows you to implement the error page in any way you want. When a user-facing error occurs, Ory Kratos will store the error message and context and redirect the User's Browser to the Error UI URL set by the selfservice.flows.error.ui_url
configuration or SELFSERVICE_FLOWS_ERROR_UI_URL
environment variable. For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration).