aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/lib')
-rw-r--r--src/client/react/lib/rejectIfBadStatus.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/react/lib/rejectIfBadStatus.js b/src/client/react/lib/rejectIfBadStatus.js
new file mode 100644
index 0000000..29bf3b2
--- /dev/null
+++ b/src/client/react/lib/rejectIfBadStatus.js
@@ -0,0 +1 @@
+export default response => (response.ok ? response : Promise.reject(response.status));