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