diff --git a/marlowe-runtime-web/src/Language/Marlowe/Runtime/Web/Types.hs b/marlowe-runtime-web/src/Language/Marlowe/Runtime/Web/Types.hs index c93e4f55d4..109fd1bac1 100644 --- a/marlowe-runtime-web/src/Language/Marlowe/Runtime/Web/Types.hs +++ b/marlowe-runtime-web/src/Language/Marlowe/Runtime/Web/Types.hs @@ -280,7 +280,9 @@ data TxOutRef = TxOutRef instance FromHttpApiData TxOutRef where parseUrlPiece t = case splitOn "#" t of [idText, ixText] -> TxOutRef <$> parseUrlPiece idText <*> parseUrlPiece ixText - _ -> Left "Expected [a-fA-F0-9]{64}#[0-9]+" + _ -> case parseUrlPiece @TxId t of + Right _ -> Left "Expected [a-fA-F0-9]{64}#[0-9]+ (hint: do you need to URL-encode the '#' as \"%23\"?)" + _ -> Left "Expected [a-fA-F0-9]{64}#[0-9]+" instance ToHttpApiData TxOutRef where toUrlPiece TxOutRef{..} = toUrlPiece txId <> "#" <> toUrlPiece txIx