-
-
Notifications
You must be signed in to change notification settings - Fork 733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【HELP】IN ErrorGroup use retry panic #986
Comments
@cwb2819259 I think it is not related to the Resty package, maybe some issue with the body content plus based on the above trace it the Go standard library panics when handling the body content. Also, I see you’re using an almost 4-year-old version of Resty. I would suggest upgrading to the latest version. Do not worry, there are no breaking changes. |
https://github.com/lib4u/grequest also for working with requests in golang |
@cwb2819259 @lib4u Can you please try the latest version, v2.16.5, and let me know your feedback? |
When I removed the SetDebug(true) method, the panic did not occur. |
@cwb2819259 Are you using the latest version of Resty? |
When I use the errorgroup package, panic occurs occasionally,I use version is : github.com/go-resty/resty/v2 v2.7.0
client is
message: panic: runtime error: index out of range [104780] with length 104767
message: goroutine 131838 [running]:
message: bytes.(*Buffer).WriteByte(0xc007f7cb00?, 0x0?)
message: /usr/local/go/src/bytes/buffer.go:282 +0x87
message: encoding/json.Indent(0xc004c3d470, {0xc00b132000, 0x14151, 0x70550f0?}, {0x0, 0x0}, {0x433cdd8, 0x3})
message: /usr/local/go/src/encoding/json/indent.go:105 +0x33a
message: github.com/go-resty/resty/v2.(*Response).fmtBodyString(0xc000b5f6d0, 0xc001c86930?)
message: /workspace/vendor/github.com/go-resty/resty/v2/response.go:165 +0x1b4
message: github.com/go-resty/resty/v2.responseLogger(0xc0046823c0, 0xc000b5f6d0)
message: /workspace/vendor/github.com/go-resty/resty/v2/middleware.go:294 +0x1cc
The text was updated successfully, but these errors were encountered: