Skip to content
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

Make transaction rejection error (node) same as blockfrost submit error #19

Open
vladimirvolek opened this issue Oct 23, 2024 · 3 comments
Assignees
Milestone

Comments

@vladimirvolek
Copy link
Member

vladimirvolek commented Oct 23, 2024

Requires:

Current situation

let reason_hex = hex::encode(&reason.0);
warn!("Transaction was rejected: {}", reason_hex);

@ginnun
Copy link
Collaborator

ginnun commented Oct 23, 2024

Is this about mimicking errors documented in https://docs.blockfrost.io/#tag/cardano--transactions/POST/tx/submit ?
If so, giving me access to the proxy code might greatly help. @vladimirvolek

@vladimirvolek
Copy link
Member Author

https://github.com/blockfrost/blockfrost-platform/actions/runs/12931994839/job/36067622580

Diff < left / right > :
 {
<  "details": {
<    "contents": {
<      "contents": {
<        "contents": {
<          "era": "ShelleyBasedEraConway",
<          "error": [
<            "ConwayUtxowFailure (UtxoFailure (ValueNotConservedUTxO (MaryValue (Coin 0) (MultiAsset (fromList []))) (MaryValue (Coin 9920718377) (MultiAsset (fromList [])))))",
<            "ConwayUtxowFailure (UtxoFailure (BadInputsUTxO (fromList [TxIn (TxId {unTxId = SafeHash \"5176274bef11d575edd6aa72392aaf993a07f736e70239c1fb22d4b1426b22bc\"}) (TxIx {unTxIx = 1})])))"
<          ],
<          "kind": "ShelleyTxValidationError"
<        },
<        "tag": "TxValidationErrorInCardanoMode"
<      },
<      "tag": "TxCmdTxSubmitValidationError"
<    },
<    "tag": "TxSubmitFail"
<  },
   "error": "Bad Request",
<  "message": "TxSubmitFail",
>  "message": "{\"contents\":{\"contents\":[\"DecoderErrorDeserialiseFailure \\\"Shelley Tx\\\" (DeserialiseFailure 0 \\\"expected list len or indef\\\")\",\"DecoderErrorDeserialiseFailure \\\"Shelley Tx\\\" (DeserialiseFailure 0 \\\"expected list len or indef\\\")\",\"DecoderErrorDeserialiseFailure \\\"Shelley Tx\\\" (DeserialiseFailure 0 \\\"expected list len or indef\\\")\",\"DecoderErrorDeserialiseFailure \\\"Shelley Tx\\\" (DeserialiseFailure 0 \\\"expected list len or indef\\\")\",\"DecoderErrorDeserialiseFailure \\\"Shelley Tx\\\" (DeserialiseFailure 0 \\\"expected list len or indef\\\")\",\"DecoderErrorDeserialiseFailure \\\"Shelley Tx\\\" (DeserialiseFailure 0 \\\"expected list len or indef\\\")\"],\"tag\":\"TxCmdTxReadError\"},\"tag\":\"TxSubmitFail\"}",
   "status_code": 400
 }

@vladimirvolek
Copy link
Member Author

Also, the endpoint https://cardano-mainnet.blockfrost.io/api/v0/tx/submit returns only a plain error message string, without a status_code, error, or details field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants