-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞 Bug: HTTP API returns "Internal Server Error" when attempting to encrypt multiple transaction metadata messages. #4652
Comments
The cause of the internal server error is this section of code: cardano-wallet/lib/api/src/Cardano/Wallet/Api/Http/Shelley/Server.hs Lines 3202 to 3207 in a2cac93
The If instead the See #4647 (comment) for an explanation of why this happens. |
…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"} ```
addressed and fixed #4651 |
Version
a2cac93
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:
$ nix develop $ just conway-integration-tests-match "encrypt multiple metadata messages"
Example failure links
Example failure log extract
Expected behaviour
Either:
Or:
The text was updated successfully, but these errors were encountered: