Open geoff-harper opened 2 months ago
Does 404 work? What environment are you running in? Native Fetch or node-fetch?
We have a test to confirm it's working: https://github.com/sindresorhus/ky/blob/2d56baf6739a49655cbbe74b5083c0350511bbed/test/hooks.ts#L610-L640
It's in native fetch and 404 is working. I can't imagine it would make a difference but I'm noticing it on a PUT req. I've also checked it on Firefox and Chrome. Its options req is 200, I can't remember if it's the same outcome when an options req is 500
Hey I've encountered an issue when receiving 500 server codes from an api. For whatever reason it doesn't seem like the
beforeError
hook gets called. The following instance isn't producing any logs in the console when I hit a 500.I've confirmed that the same code is fine for 404s and other 400 codes. Here are the raw response headers for the 500
and the 404