map range-error to the right http error code #157
1 changed files with 1 additions and 0 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue