Closed kakkun61 closed 5 years ago
Web.Direct.Map.decodeTalkRoom enters the error case below.
Web.Direct.Map.decodeTalkRoom
| tp == 2 = case look "talk_name" m of Just (M.ObjectStr tname) -> GroupTalk tname _ -> error "decodeTalkRoom"
I confirm that the m whose type is Data.MessagePack.Object actually doesn't have the talk_name field.
m
Data.MessagePack.Object
talk_name
How to fix this?
One idea is below.
| tp == 2 = case look "talk_name" m of Just (M.ObjectStr tname) -> GroupTalk tname _ -> GroupTalk ""
Problem
Web.Direct.Map.decodeTalkRoom
enters the error case below.I confirm that the
m
whose type isData.MessagePack.Object
actually doesn't have thetalk_name
field.Fix
How to fix this?
One idea is below.