Fix api error response