map range-error to the right http error code
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
Trinity Pointard 2021-11-19 20:17:35 +01:00
parent 85b2e4ca29
commit 8c45ad8e38

View file

@ -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,
}
}