servant-client-ghcjs: Fixed not throwing FailureResponse

This commit is contained in:
Falco Peijnenburg 2017-10-08 19:47:44 +02:00
parent 74bde0a73d
commit 911be50df2

View file

@ -89,7 +89,13 @@ performRequest req = do
xhr <- liftIO initXhr
burl <- asks baseUrl
liftIO $ performXhr xhr burl req
toResponse xhr
resp <- toResponse xhr
let status = statusCode (responseStatusCode resp)
unless (status >= 200 && status < 300) $
throwError $ FailureResponse resp
pure resp
-- * initialization