Skip to content

Log the response body and the request URI in the Request function #5

Description

@borosr

Inside the Request function, there is a step where you are trying to unmarshal the request body to JSON. If it fails because the response is a 404 not found error, the json.Unmarshal's error will be something like: json: cannot unmarshal number into Go value of type ... which is not helping the developer to figure out what is the real issue.
Can you add an optional log there inside the error handling to print out the request URI and the raw response body if the error happens?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions