I have created an custom error type :
type ErrorResponse struct { Response *http.Response `json:"-"` StatusCode int `json:"