Closed jonathanknowles closed 3 months ago
The cause of the internal server error is this section of code: https://github.com/cardano-foundation/cardano-wallet/blob/a2cac93ed8f55512d4e3590a6c8d64f6df5c4f7b/lib/api/src/Cardano/Wallet/Api/Http/Shelley/Server.hs#L3202-L3207
The error
branch will only be evaluated if the TxMetadataDetailedSchema
JSON serialisation option is used in conjunction with a TxMetaMap
object that contains multiple msg
keys.
If instead the TxMetadataNoSchema
JSON serialisation option is used, then only the last msg
key-value mapping will be retained, and the error
branch will not be evaluated.
See https://github.com/cardano-foundation/cardano-wallet/issues/4647#issuecomment-2193646898 for an explanation of why this happens.
addressed and fixed https://github.com/cardano-foundation/cardano-wallet/pull/4651
Version
a2cac93ed8f55512d4e3590a6c8d64f6df5c4f7b
Bug description
If:
constructTransaction
HTTP API endpointmetadata
field is populated with metadata to be encrypted according to CIP-83And if:
msg
keyTxMetadataDetailedSchema
is used.Then the HTTP API will return "Internal Server Error".
Reproduction steps
See the following PR that demonstrates the issue:
With a fresh checkout of the above PR, run:
Example failure links
Example failure log extract
Expected behaviour
Either:
Or: