on master help sign in
report more information when registry fetches get bad data
commitd7153e7aa176816cd66d968003b8156529be1339 authorEvan Czaplicki <evancz@users.noreply.github.com> dateThu 13 Jun 2019, 18:08 (7 years ago) parentdf7839b
1 file changed+5−2
builder/src/Deps/Registry.hs+5−2
builder/src/Deps/Registry.hs+5−2
@@ -193,11 +193,14 @@ getVersions' name (Registry _ versions) =
193193
194194post :: Http.Manager -> String -> D.Decoder x a -> (a -> IO b) -> IO (Either Exit.RegistryProblem b)
195195post manager path decoder callback =
196− Http.post manager (Website.route path []) [] Exit.RP_Http $
196+ let
197+ url = Website.route path []
198+ in
199+ Http.post manager url [] Exit.RP_Http $
197200 \body ->
198201 case D.fromByteString decoder body of
199202 Right a -> Right <$> callback a
200− Left _ -> return $ Left Exit.RP_Data
203+ Left _ -> return $ Left $ Exit.RP_Data url body
201204
202205
203206