supports error response from gateway server