map range-error to the right http error code
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Trinity Pointard 2021-11-19 20:17:35 +01:00
parent 85b2e4ca29
commit 8c45ad8e38
1 changed files with 1 additions and 0 deletions

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