Skip to content

feat: Experimental: Add more specific error messages in submit/simulate - #7848

Draft
mvadari wants to merge 8 commits into
developfrom
mvadari/error-message-ter
Draft

feat: Experimental: Add more specific error messages in submit/simulate#7848
mvadari wants to merge 8 commits into
developfrom
mvadari/error-message-ter

Conversation

@mvadari

@mvadari mvadari commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR refactors the error code return spots to add the log line in that shows up there, which can be returned in submit/simulate for easier debug

This is an experimental vibe-coded version for PoC purposes

Sample output:

Request:
{
  "command": "simulate",
  "tx_json": {
    "TransactionType": "SignerListSet",
    "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
    "SignerEntries": [],
    "SignerQuorum": 1
  }
}

Response:
{
  "api_version": 2,
  "id": 5,
  "result": {
    "applied": false,
    "engine_result": "temMALFORMED",
    "engine_result_code": -299,
    "engine_result_message": "Malformed transaction.",
    "engine_result_reason": "Too many or too few signers in signer list.",   <--- NEW ADDITION TO OUTPUT
    "ledger_index": 3,
    "tx_json": {
      "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
      "Fee": "10",
      "Sequence": 1,
      "SignerEntries": [],
      "SignerQuorum": 1,
      "SigningPubKey": "",
      "TransactionType": "SignerListSet",
      "TxnSignature": "",
      "hash": "19F6B0D9FFC68164A011161A00477EA1FF173A31FF5095B1B72FA8270294A547"
    }
  },
  "type": "response"
}

Context of Change

easier debugging

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@mvadari mvadari added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DraftRunCI Normally CI does not run on draft PRs. This opts in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant