undici icon indicating copy to clipboard operation
undici copied to clipboard

Error handling?

Open calvintwr opened this issue 2 years ago • 4 comments

This would solve...

It doesn’t look like there’s anything in the documentation on error handling, except perhaps only statusCode.

For comprehensiveness, I would suggest it be considered important to include error handling in the first example.

calvintwr avatar Feb 05 '22 08:02 calvintwr

PR is welcome

ronag avatar Feb 05 '22 08:02 ronag

Sure. Can you point me to the code that does error handling?

calvintwr avatar Feb 05 '22 14:02 calvintwr

@ronag Would a PR implementing (opt-in) error throwing for 4xx and 5xx responses be accepted?

kibertoad avatar May 17 '22 12:05 kibertoad

I do not see a problem with having it as an option.

mcollina avatar May 17 '22 22:05 mcollina