Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demonstrate that the HTTP API returns "Internal Server Error" when at…
…tempting to encrypt multiple transaction metadata messages. (#4651) ## Related issue - #4652 ## Description This PR demonstrates that if: - the user calls the `constructTransaction` HTTP API endpoint - the `metadata` field is populated with metadata to be encrypted according to [CIP-83](https://cips.cardano.org/cip/CIP-83) And if: - the included metadata map includes **_more than one_** message with a `msg` key - the **_detailed_** JSON schema option `TxMetadataDetailedSchema` is used. Then the HTTP API will return "Internal Server Error". ## How to reproduce the failure With a fresh checkout of the branch in this PR, run: ```sh $ nix develop $ just conway-integration-tests-match "encrypt multiple metadata messages" ``` ## Example failure links - https://buildkite.com/cardano-foundation/cardano-wallet/builds/5570#01905814-2e6e-460b-83aa-7cfed4ede245/139-753 - https://buildkite.com/cardano-foundation/cardano-wallet/builds/5570#01905814-2e70-4cc3-b3f8-8f8f3d9eb0f8/139-758 ## Example failure log extract ```hs only one 'msg' field expected CallStack (from HasCallStack): error, called at src/Cardano/Wallet/Api/Http/Shelley/Server.hs:3207:24 in cardano-wallet-api-2024.5.5-AKdt1G4fjDDEhVlTTGjQVf:Cardano.Wallet.Api.Http.Shelley.Server From the following response: Left ( DecodeFailure "Something went wrong" "Unexpected "Something went wrong", expecting JSON value" ) While verifying value: ( Status { statusCode = 500 , statusMessage = "Internal Server Error" } , Left ( DecodeFailure "Something went wrong" "Unexpected "Something went wrong", expecting JSON value" ) ) expected: Status {statusCode = 202, statusMessage = "Accepted"} but got: Status {statusCode = 500, statusMessage = "Internal Server Error"} ```
- Loading branch information