Skip to content
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

Check for MaxBytesError instead of a string comparison #6700

Closed
francislavoie opened this issue Nov 21, 2024 · 0 comments
Closed

Check for MaxBytesError instead of a string comparison #6700

francislavoie opened this issue Nov 21, 2024 · 0 comments
Labels
good first issue 🐤 Good for newcomers

Comments

@francislavoie
Copy link
Member

We should stop comparing against "http: request body too large" when detecting a ReadCloser error:

if err != nil && err.Error() == "http: request body too large" {

Go stdlib now has a MaxBytesError type we can check for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue 🐤 Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant