Use proper HTML error codes and catch MessageExceptions with custom message
Occuring errors are always stated as HTML 500 errors and in many cases,
is raised with its default message “An unhandled exception occured”, which is not very helpful.
Example: when the creation of a folder fails due to missing permissions,
an error 403 (forbidden)
should be returned to the client.
(from redmine: issue id 1719, created on 2014-05-19 by root)