Skip to content

Commit 5c22399

Browse files
committed
use 'Either InvalidUrlException' as a base monad for requestFromURI
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.
1 parent fccb250 commit 5c22399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/core/src/Cardano/Pool/Metadata.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ fetchFromRemote tr builders manager url hash = runExceptTLog $ do
169169

170170
getChunk :: URI -> ExceptT String IO (Maybe ByteString)
171171
getChunk uri = do
172-
req <- requestFromURI uri
172+
req <- withExceptT show $ except $ requestFromURI uri
173173
liftIO $ traceWith tr $ MsgFetchPoolMetadata hash uri
174174
ExceptT
175175
$ handle fromIOException

0 commit comments

Comments
 (0)