From 9afeb4d1fa123da40e3332cb762086225b8554ae Mon Sep 17 00:00:00 2001 From: Sergey Ivanov Date: Mon, 15 May 2023 16:22:13 +0400 Subject: [PATCH] Fix missed error handling of deserializeOrFail --- hbs2/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hbs2/Main.hs b/hbs2/Main.hs index aeb24650..d81eb2f4 100644 --- a/hbs2/Main.hs +++ b/hbs2/Main.hs @@ -226,7 +226,8 @@ runCat opts ss = do walk (fromHashRef h) AnnRef h -> do - let lnk = _ $ deserialiseOrFail @AnnotatedHashRef obj + let lnk = either (error . ("Deserialise AnnotatedHashRef: " <>) . show) id $ + deserialiseOrFail @AnnotatedHashRef obj let mbHead = headMay [ h | HashRefMerkle (HashRefObject (HashRef h) _) <- universeBi lnk ]