-
Notifications
You must be signed in to change notification settings - Fork 543
Closed
Description
Describe the proposal
When get secret encountered error, http.Response is formatted in error. For example, if get a key that not exsit, the error message is:
couldn't to get successful response: &http.Response{Status:"404 Not Found", StatusCode:404, Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{"Cache-Control":[]string{"no-store"}, "Content-Length":[]string{"14"}, "Content-Type":[]string{"application/json"}, "Date":[]string{"Tue, 01 Jun 2021 13:48:49 GMT"}}, Body:(*http.bodyEOFSignal)(0xc000e26080), ContentLength:14, TransferEncoding:[]string(nil), Close:false, Uncompressed:false, Trailer:http.Header(nil), Request:(*http.Request)(0xc000b93e00), TLS:(*tls.ConnectionState)(nil)}, {"errors":[]}
In fact there much massage that not needed. StatusCode and the response body will be enough. Error message after optimized will be:
couldn't get successful response, status code 404, body {"errors":[]}
Metadata
Metadata
Assignees
Labels
No labels