Hi,
Currently, when a 401 error is returned, the response looks like this:
"data": null,
"error": {
"status": 401,
"name": "UnauthorizedError",
"message": "Missing or invalid credentials",
"details": {}
}
}```
I'm wondering if there are other default languages available for the message field, such as Chinese. Alternatively, is it possible to customize the default API responses (401, 404, 500, etc.) for the message or name fields?
Ideally, I'd like to be able to have something like this:
{
“data”: null,
“error”: {
“status”: 401,
“name”: “default response in other language… or I can extend it”,
“message”: “default response in other language… or I can extend it”,
“details”: {}
}
}
I already read https://docs.strapi.io/dev-docs/plugins/i18n#configuration-of-the-default-locale
and still don't know how to do. 🥲
<i>This topic has been created from a Discord post (1261559449542332447) to give it more visibility.
It will be on Read-Only mode here.
<a href="https://discord.com/channels/811989166782021633/1261559449542332447/1261559449542332447">Join the conversation on Discord</a></i>