i am confused with the return result.
there are two errors which one is failed to send http with reqwest::Error
and i another get wrong http back.
but in async i don't know how to parse the second error.
can somebody help me ?
It doesn't look like you've implemented the From trait for FetchError to get that function to compile change FetchError::from(e) to FetchError::Http. Since both of those function calls that you're using map_err on return Result<T, request::Error> they can both map to FetchError::Http
it will be two error type. one is http error it should be parse with Http(err)
but another is get the wrong info such as
{msg:"you don't send correct message", code: 400}
but i don't know how to realize these.
Please do as alice requested. It's very unpleasant to read your code with all the undesired interspersed blank lines. Most Rustaceans may have a reaction like mine: I ignore code in posts when the poster has previously been asked to format it correctly but continues to not do so.
hi , there are some errors , can you help me ?
or is there any way to solve or realize this function?
when parsing force MiningInfoResponse error,
i need to parse it to PoolErrorWrapper,
and use its x.error as the final return type.
the trait `std::convert::From<serde_json::error::Error>` is not implemented for `wallet::api::FetchError`