got
got copied to clipboard
Not seeing GotError.HTTPError returned on non 2xx/3xx responses
Got v11.8.6 (also true of v11.0.0)
If I make a call to a site that returns a 404 code (either using nock
or an actual site returning 404), I get a HTTPError
with very limited information. The docs mention getting a HTTPError
with a code of ERR_NON_2XX_3XX_RESPONSE
, and that's accurate, but I'm not getting any rich metadata to help with debugging like I used to with Got v9.6.0 (I've been working on upgrading). v9.6.0 threw a GotError.HTTPError
which had great data.
Shouldn't there be more data? The old GotError
had the response information, gotOptions
, statusCode
, and statusMessage
, all of which were great.
- [x] I have read the documentation.
Got v11 is no longer maintained except for critical security bug fixes.