When developing REST API errors, it seems good to follow standard HTTP codes (4XX and 5XX) and include the body (XML / JSON) with:
- short message
- Description
- the code
My question is: should these messages be internationalized?
I am inclined to think that displaying the message to the client is the responsibility on the client side, and these API errors should be considered as an agreement (format and code field) between the client application and the API, but should not be considered by default as ideal for direct contact with the client, therefore formatting of the final message "Ooops ... something was wrong" should be done on the client side. In another case, I can see the API deployment because PO needs to change “Oops” to “Uups” and the like, which looks like something similar to the look of the IMHO client application.
source share