abort request on error rather than sending 500 status code