ethanent / phin

Node HTTP client
MIT License
576 stars 33 forks source link

Don't parse JSON if status code is not 2xx #68

Open jdforsythe opened 3 years ago

jdforsythe commented 3 years ago

Fixes #61

Prevents parsing body as JSON unless the status code is in the 2xx range to allow 4xx and 5xx errors to propagate without JSON parsing errors