Skip to content

Commit

Permalink
feat: capture headers for error too
Browse files Browse the repository at this point in the history
daulet authored and six-ddc committed Dec 3, 2024
1 parent be5acb1 commit 7ad466d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions requester.go
Original file line number Diff line number Diff line change
@@ -267,6 +267,7 @@ func (r *Requester) DoRequest(req *fasthttp.Request, resp *fasthttp.Response, rr
if resp.StatusCode() >= 500 {
writeTo = r.errWriter
_, _ = r.errWriter.Write([]byte(fmt.Sprintf("\n%d %s\n", resp.StatusCode(), rr.cost)))
_, _ = r.errWriter.Write([]byte(fmt.Sprintf("%s", &resp.Header)))
}
err = resp.BodyWriteTo(writeTo)
if err != nil {

0 comments on commit 7ad466d

Please sign in to comment.