• Niklas Adolfsson's avatar
    fix(http client): more user-friendly error messages when decoding fails (#853) · 94795309
    Niklas Adolfsson authored
    * fix(http client): serde_json::Value -> T
    
    This PR changes the http client to decode the reponse as `Response<serde_json::Value> -> Response<R>`
    In order to get a more user-friendly error message
    
    Before:
    
    ```
    response: Err(ParseError(Error("missing field `error`", line: 1, column: 3752798)))
    ```
    
    After
    
    ```
    2022-08-11T13:57:12.033043Z  INFO http: r: Parse error: invalid type: string "lo", expected u8
    ```
    
    * address grumbles
    
    * Update client/http-client/src/client.rs
    
    * Update client/http-client/src/client.rs
    94795309