fix api error response