One more error fixed

This commit is contained in:
Franklin 2022-08-31 13:50:17 -04:00
parent b80c9b47fc
commit f6deba70ba
3 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View File

@ -183,7 +183,7 @@ dependencies = [
[[package]]
name = "actix-web-utils"
version = "0.2.7"
version = "0.2.8"
dependencies = [
"actix-web",
"log",

View File

@ -1,6 +1,6 @@
[package]
name = "actix-web-utils"
version = "0.2.7"
version = "0.2.8"
edition = "2021"
authors = ["Franklin E. Blanco"]
description = "Just some useful addons for actix web."

View File

@ -16,13 +16,13 @@ macro_rules! unwrap_or_return_handled_error {
( $error_status_code:literal, $e:expr, $type_of_resp:ty ) => {
match $e {
Ok(value) => value,
Err(error) => return actix_web_utils::traits::macro_traits::ReturnableErrorShape::convert_to_returnable::<$type_of_resp>(&error, error_status_code)
Err(error) => return actix_web_utils::traits::macro_traits::ReturnableErrorShape::convert_to_returnable::<$type_of_resp>(&error, $error_status_code)
}
};
( $error_status_code:literal, $success_status_code:literal, $e:expr, $type_of_resp:ty) => {
match $e {
Ok(value) => return actix_web_utils::typed_response::TypedHttpResponse::return_standard_response($success_status_code, value),
Err(error) => return actix_web_utils::traits::macro_traits::ReturnableErrorShape::convert_to_returnable::<$type_of_resp>(&error, error_status_code)
Err(error) => return actix_web_utils::traits::macro_traits::ReturnableErrorShape::convert_to_returnable::<$type_of_resp>(&error, $error_status_code)
}
}
}