From 1783fad752cabed7257f9fefab9358434dc48268 Mon Sep 17 00:00:00 2001 From: Jonas Berlin Date: Sun, 3 Nov 2024 18:38:46 +0200 Subject: [PATCH] feat: Add 502 error when upstream unavailable --- rpxy-lib/src/message_handler/http_result.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rpxy-lib/src/message_handler/http_result.rs b/rpxy-lib/src/message_handler/http_result.rs index 98cdb453..5fcada12 100644 --- a/rpxy-lib/src/message_handler/http_result.rs +++ b/rpxy-lib/src/message_handler/http_result.rs @@ -53,6 +53,7 @@ impl From for StatusCode { HttpError::FailedToAddSetCookeInResponse(_) => StatusCode::INTERNAL_SERVER_ERROR, HttpError::FailedToGenerateDownstreamResponse(_) => StatusCode::INTERNAL_SERVER_ERROR, HttpError::FailedToUpgrade(_) => StatusCode::INTERNAL_SERVER_ERROR, + HttpError::FailedToGetResponseFromBackend(_) => StatusCode::BAD_GATEWAY, // HttpError::NoUpgradeExtensionInRequest => StatusCode::BAD_REQUEST, // HttpError::NoUpgradeExtensionInResponse => StatusCode::BAD_GATEWAY, _ => StatusCode::INTERNAL_SERVER_ERROR,