diff --git a/utils/src/error.rs b/utils/src/error.rs index 2c9bc30..0f2502b 100644 --- a/utils/src/error.rs +++ b/utils/src/error.rs @@ -25,8 +25,9 @@ impl ResponseError for Error { use reqwest::StatusCode; use Error::*; match self { - // 503 Service Unavailable - Reqwest(error) => error.status().unwrap_or(StatusCode::SERVICE_UNAVAILABLE), + // Theoretically could be 503 Service Unavailable in case remote is actually down, + // but will also throw for network errors, so a generic 500 Internal Server Error is more appropriate. + Reqwest(error) => error.status().unwrap_or(StatusCode::INTERNAL_SERVER_ERROR), // 403 Forbidden #[cfg(feature = "nothuman")] NotHuman { .. } => StatusCode::FORBIDDEN,