Historically, the BaseX REST API has handled exceptions by returning only the exception content itself.
..wow, you're always up to date ;)
We played around with the return message, and we're not sure if we should go for a complete HTML-based error message or limit the feedback to a simple text message. The next commit will restore the old state.