Hi everyone !
I’m currently working on a project which requires a custom extension in Directus. And i would like to know what is the best practice to translate error messages using the internal Directus APIs.
Exemple of error :
const UncompletedIntervention = createError('INVALID_PAYLOAD_ERROR', 'Missing Images', 400);
API errors are not translated in the API itself that should be handled by the application interacting with the API.
For example the Directus Admin App translates errors shown to users based on the error code ('INVALID_PAYLOAD_ERROR'
in your example)
I would like to translate (i18n) the error messages in the Directus App. Not in my app.