Make the masque client return a special error when it gets an expected failure This allows the gateway response handler to return a testable exception that we look for in the run masque client method. PiperOrigin-RevId: 848204801
diff --git a/quiche/quic/masque/masque_ohttp_client.cc b/quiche/quic/masque/masque_ohttp_client.cc index 65ef668..af08e1c 100644 --- a/quiche/quic/masque/masque_ohttp_client.cc +++ b/quiche/quic/masque/masque_ohttp_client.cc
@@ -301,9 +301,9 @@ auto cleanup = absl::MakeCleanup([this, it]() { pending_ohttp_requests_.erase(it); }); QUICHE_RETURN_IF_ERROR(response.status()); + QUICHE_RETURN_IF_ERROR(CheckGatewayResponse(*response)); QUICHE_RETURN_IF_ERROR( CheckStatusAndContentType(*response, "message/ohttp-res")); - QUICHE_RETURN_IF_ERROR(CheckGatewayResponse(*response)); absl::StatusOr<BinaryHttpResponse> binary_response = TryExtractBinaryResponse(request_id, it->second, *response); QUICHE_RETURN_IF_ERROR(binary_response.status());