Exception middleware which allows more clear & efficient printouts of errors raised.
Particularly, it overrides the default debug pages of Django which contain extensive HTML
and returns plain text in case the request is performed with the curl command-line tool
or JSON-formatted as an API response inside client applications.