From 8c45ad8e38094540d27394fd608c1c8a1e004ee4 Mon Sep 17 00:00:00 2001 From: Trinity Pointard Date: Fri, 19 Nov 2021 20:17:35 +0100 Subject: [PATCH] map range-error to the right http error code --- src/api/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/error.rs b/src/api/error.rs index a57f926b..a86d53df 100644 --- a/src/api/error.rs +++ b/src/api/error.rs @@ -90,6 +90,7 @@ impl Error { Error::InternalError(_) | Error::Hyper(_) | Error::Http(_) => { StatusCode::INTERNAL_SERVER_ERROR } + Error::InvalidRange(_) => StatusCode::RANGE_NOT_SATISFIABLE, _ => StatusCode::BAD_REQUEST, } }