From 0b4b2b0bb8e465397434a4427f0458c5eaf284d7 Mon Sep 17 00:00:00 2001 From: Jeremy Forsythe Date: Mon, 1 Mar 2021 21:37:05 -0500 Subject: [PATCH] Don't parse JSON if status code is not 2xx 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 --- docs/global.html | 2 +- docs/index.html | 2 +- docs/phin.js.html | 7 +++++-- lib/phin.js | 5 ++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/global.html b/docs/global.html index 95d9c9d..c10e1f1 100644 --- a/docs/global.html +++ b/docs/global.html @@ -1090,7 +1090,7 @@

Home

Global