diff --git a/exec/Chainweb/Coins.hs b/exec/Chainweb/Coins.hs index 1da14b8a..babcfe83 100644 --- a/exec/Chainweb/Coins.hs +++ b/exec/Chainweb/Coins.hs @@ -54,7 +54,8 @@ newtype CsvTime = CsvTime { _csvTime :: UTCTime } instance CSV.FromField CsvTime where parseField f = either fail pure ev where - ev = fmap CsvTime . parseTimeM True defaultTimeLocale "%FT%TZ" =<< + ev = maybe (Left $ "Error parsing CsvTime " <> show f) (Right . CsvTime) . + parseTimeM True defaultTimeLocale "%FT%TZ" =<< bimap show T.unpack (decodeUtf8' f) newtype MinerRewards = MinerRewards