atlassian-connect-core 0.5.0.0 → 0.5.0.1
raw patch · 2 files changed
+8/−6 lines, 2 filesdep ~snap-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: snap-core
API changes (from Hackage documentation)
Files
atlassian-connect-core.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.5.0.0+version: 0.5.0.1 -- A short (one-line) description of the package. synopsis: Atlassian Connect snaplet for the Snap Framework and helper code.@@ -105,7 +105,7 @@ , http-media == 0.4.* , mtl == 2.* , snap >= 0.13.3 && < 0.14- , snap-core >= 0.9 && < 0.10+ , snap-core >= 0.9 && <= 1 , split == 0.2.* , text >= 0.11 && < 1.3 , time >= 1.1 && < 1.5
src/Snap/AtlassianConnect/HostRequest.hs view
@@ -142,10 +142,12 @@ expiryPeriod = 1 responder :: FromJSON a => Int -> BL.ByteString -> Either ProductErrorResponse a-responder 200 body = case eitherDecode body of- Right jsonResponse -> Right jsonResponse- Left err -> Left $ ProductErrorResponse 200 (T.pack $ "Could not parse the json response: " ++ show err)-responder responseCode body = Left $ ProductErrorResponse responseCode (T.decodeUtf8 . BL.toStrict $ body)+responder responseCode body + | 200 <= responseCode && responseCode < 300 =+ case eitherDecode body of+ Right jsonResponse -> Right jsonResponse+ Left err -> Left $ ProductErrorResponse responseCode (T.pack $ "Could not parse the json response: " ++ show err)+ | otherwise = Left $ ProductErrorResponse responseCode (T.decodeUtf8 . BL.toStrict $ body) -- Wrapping this method for now. See: http://goo.gl/AZtRHZ setPostParams :: [(B.ByteString, B.ByteString)] -> Endo Request