Correct the error responses so we do not get HTTP 500 for all errors.