Skip to content

Commit

Permalink
use 'Either InvalidUrlException' as a base monad for requestFromURI
Browse files Browse the repository at this point in the history
  Again... errors from 'requestFromURI' are thrown via 'MonadThrow', which, in the case of 'ExceptT' throws in the base monad, which is IO in this case.
  • Loading branch information
KtorZ committed Aug 3, 2020
1 parent fccb250 commit 5c22399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/src/Cardano/Pool/Metadata.hs
Expand Up @@ -169,7 +169,7 @@ fetchFromRemote tr builders manager url hash = runExceptTLog $ do

getChunk :: URI -> ExceptT String IO (Maybe ByteString)
getChunk uri = do
req <- requestFromURI uri
req <- withExceptT show $ except $ requestFromURI uri
liftIO $ traceWith tr $ MsgFetchPoolMetadata hash uri
ExceptT
$ handle fromIOException
Expand Down

0 comments on commit 5c22399

Please sign in to comment.