[go: up one dir, main page]

Return proper error message in ocp-resto/client

The function was rereturning the client's request body instead of the server's answer body.

For tezos-client rpc post /chains/main/blocks/head/helpers/forge/operations with "[]"

it changes

Warning:                                                                           
                                                                    
   The node you are connecting to claims to be running in a                               
                    Tezos TEST SANDBOX.                                         
      Do NOT use your fundraiser keys on this network.
  You should not see this message if you are not a developer.  
                 
Error:                   
  Rpc request failed:      
     - meth: POST        
     - uri: http://localhost:20002/chains/main/blocks/head/helpers/forge/operations
     - error: Oups! It looks like we forged an invalid HTTP request.
                []                                                              

into

Warning:

   The node you are connecting to claims to be running in a
                    Tezos TEST SANDBOX.
      Do NOT use your fundraiser keys on this network.
  You should not see this message if you are not a developer.

Error:
  Rpc request failed:
     - meth: POST
     - uri: http://localhost:20000/chains/main/blocks/head/helpers/forge/operations
     - error: Oups! It looks like we forged an invalid HTTP request.
                Failed to parse the request body: Unexpected empty array instead of object

Merge request reports

Loading