on master help sign in
Merge pull request #57 from obsidiansystems/text-jsstring

Merge master into text-jsstring

commit6bd16ed27fa7274fffe1cb2f1a607021c3e82eae authorGreg Hale <ImAlsoGreg@gmail.com> dateTue 6 Mar 2018, 21:10 (9 years ago) parentcff34996fb8c02
1 file changed+2−1
src/Servant/Common/Req.hs+2−1
src/Servant/Common/Req.hs+2−1
@@ -390,7 +390,8 @@ evalResponse
390390 -> (tag, XhrResponse)
391391 -> ReqResult tag a
392392evalResponse decodeRes (tag, xhr) =
393− let okStatus = _xhrResponse_status xhr < 400
393+ let status = _xhrResponse_status xhr
394+ okStatus = status >= 200 && status < 400
394395 errMsg = fromMaybe
395396 ("Empty response with error code " <>
396397 T.pack (show $ _xhrResponse_status xhr))