laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 28 forks source link

Make the 'Server Error' string in the exception handler overridable #2502

Open merjn opened 3 years ago

merjn commented 3 years ago

The string 'Server Error' is not overridable by default. See https://github.com/laravel/framework/blob/8.x/src/Illuminate/Foundation/Exceptions/Handler.php on line 639.

Context: We are developing a SPA that returns a JSON error message as response.

My use case is that I have to translate this error to something more user friendly - and it must be Dutch. I'm well aware of the fact that I can override the render method, but it feels like a lot to override for something that small.