Improve error handling. Always return a response.
When an error is encountered, this response is
generated automatically by throwing a
WebApplicationException.