pub(crate) fn error_response(error: HttpError, status: StatusCode) -> Response {
    let mut response = Response::new(Version::Http11, status);
    let err_msg = ErrorMessage {
        code: "UNDEFINED".to_string(),
        message: format!("{:?}", error),
    };
    response.set_body(Body::new(err_msg));
    response
}
/// Generate a HTTP error response message with status code and error message.
Generate a HTTP error response message with status code and error message.
Generate a HTTP error response message with status code and error message .
pub(crate) fn error_response(error: HttpError, status: StatusCode) -> Response {
    let mut response = Response::new(Version::Http11, status);
    let err_msg = ErrorMessage {
        code: "UNDEFINED".to_string(),
        message: format!("{:?}", error),
    };
    response.set_body(Body::new(err_msg));
    response
}
pub ( crate ) fn error_response ( error : HttpError , status : StatusCode ) -> Response { let mut response = Response :: new ( Version :: Http11 , status ) ; let err_msg = ErrorMessage { code : " " . to_string ( ) , message : format ! ( " " error ) , } ; response . set_body ( Body :: new ( err_msg ) ) ; response }
Generate a HTTP error response message with status code and error message.
Generate a HTTP error response message with status code and error message .
error
HttpError
status
StatusCode
error
HttpError
status
StatusCode