Closed FuriosoJack closed 4 years ago
Hi, this is not really the responsibility of the package, but yours as developer of the application.
There's a lot of exceptions that get thrown around, and most of them are not even inside of this package. If you need to return localised error messages, you should set the exception message yourself.
Hi, this is not really the responsibility of the package, but yours as developer of the application.
There's a lot of exceptions that get thrown around, and most of them are not even inside of this package. If you need to return localised error messages, you should set the exception message yourself.
I disagree. For example, the exception when the Accept header is not sent. That exception is not documented so it is very tedious to look for the exceptions and know what is the class to make a hook according to the instanceof and so now that is with one but now with many it is a tedious task.
@FuriosoJack Yes but, these exceptions are not actually meant to be read by humans (or I should clarify, customers/consumers), they are meant to be read by either other APIs or developers debugging them.
You should not display these exceptions' messages to your end users - only things like validation errors (which are translated).
Actual Behaviour
Add message language exeptions