got rid of the Jsonpayload error, switching to generic errors

This commit is contained in:
2025-07-14 13:02:05 -04:00
parent b11cecdff4
commit f9ee10491d

View File

@ -128,7 +128,7 @@ pub fn derive_http_response(input: TokenStream) -> TokenStream {
let expanded = quote! { let expanded = quote! {
impl #name { impl #name {
pub async fn receive(resp: awc::ClientResponse) -> Result<Self, actix_web::error::JsonPayloadError> { pub async fn receive(resp: awc::ClientResponse) -> Result<Self, std::error::Error> {
resp.json().await resp.json().await
} }
} }
@ -175,7 +175,7 @@ pub fn derive_response_vec(input: TokenStream) -> TokenStream {
/// Assumes `Self` implements `DeserializeOwned`. /// Assumes `Self` implements `DeserializeOwned`.
pub async fn response_vec( pub async fn response_vec(
responses: Vec<awc::ClientResponse>, responses: Vec<awc::ClientResponse>,
) -> Result<Vec<Self>, awc::error::JsonPayloadError> ) -> Result<Vec<Self>, std::error::Error>
where where
Self: Sized + serde::de::DeserializeOwned, Self: Sized + serde::de::DeserializeOwned,
{ {