Hacker News new | past | comments | ask | show | jobs | submit login

In this case, it really is - because until Go 1.19, that function simply returned `errors.New("http: request body too large")`. So until Go 1.19, there really was no other way to check if this error occurred than `err.String() == "http: request body too large"`. Even if we had had errors.Is/As earlier, it wouldn't have helped in this case.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: