diff --git a/src/error.rs b/src/error.rs index 084249217..f9bbca241 100644 --- a/src/error.rs +++ b/src/error.rs @@ -627,6 +627,12 @@ pub fn ErrorPreconditionFailed(err: T) -> InternalError { InternalError::new(err, StatusCode::PRECONDITION_FAILED) } +/// Helper function that creates wrapper of any error and generate *RANGE NOT SATISFIABLE* response. +#[allow(non_snake_case)] +pub fn ErrorRangeNotSatisfiable(err: T) -> InternalError { + InternalError::new(err, StatusCode::RANGE_NOT_SATISFIABLE) +} + /// Helper function that creates wrapper of any error and generate *EXPECTATION FAILED* response. #[allow(non_snake_case)] pub fn ErrorExpectationFailed(err: T) -> InternalError {