got rid of the Jsonpayload error, switching to generic errors
This commit is contained in:
@ -128,7 +128,7 @@ pub fn derive_http_response(input: TokenStream) -> TokenStream {
|
||||
|
||||
let expanded = quote! {
|
||||
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
|
||||
}
|
||||
}
|
||||
@ -175,7 +175,7 @@ pub fn derive_response_vec(input: TokenStream) -> TokenStream {
|
||||
/// Assumes `Self` implements `DeserializeOwned`.
|
||||
pub async fn response_vec(
|
||||
responses: Vec<awc::ClientResponse>,
|
||||
) -> Result<Vec<Self>, awc::error::JsonPayloadError>
|
||||
) -> Result<Vec<Self>, std::error::Error>
|
||||
where
|
||||
Self: Sized + serde::de::DeserializeOwned,
|
||||
{
|
||||
|
Reference in New Issue
Block a user