Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SubmitError.type
Members list
Type members
Types
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Create a SubmitError from a TransactionException.
Create a SubmitError from a TransactionException.
This is used by the Emulator to map internal validation exceptions to SubmitError.
Two exceptions are folded into NodeSubmitError.UtxoNotAvailable: BadInputsUTxO and the union case BadAllInputsUTxO, which is the one that populates unavailableInputs. Those two really are one condition – an input this transaction spends is gone, the race a caller retries on. BadCollateralInputsUTxO (a wallet problem) and BadReferenceInputsUTxO (a script the transaction points at is not there) are not that condition, so they keep their own rule names through NodeSubmitError.ValidationError.errorCode like every other unclassified rejection.
Both script exceptions do stay one case, NodeSubmitError.ScriptFailure: "a script this transaction carries did not validate" is a single thing to branch on, logs, scriptHash and spentBudget are declared optional precisely because a native script produces none of them, and parseValidationError cannot tell native from Plutus in a provider's error body either – splitting here would put the two paths back on different vocabularies.
Everything else keeps its rule name through NodeSubmitError.ValidationError.errorCode, so an unclassified rejection is "FeesOk" or "MissingKeyHashes" rather than an anonymous "ValidationError".
Attributes
Create a SubmitError from an HTTP status code and message.
Create a SubmitError from an HTTP status code and message.
This is used by HTTP-based providers like Blockfrost to classify errors based on status codes and error message patterns.
Attributes
Parse a validation error message to classify it into a specific SubmitError type.
Parse a validation error message to classify it into a specific SubmitError type.
This attempts to match known Cardano ledger error patterns.
The classification it produces is the same vocabulary the emulator's fromException produces, so SubmitError.rule means the same thing whichever provider a caller is pointed at. Only the NodeSubmitError.ValidationError fallback differs: its errorCode is whatever extractErrorCode could find in the provider's own prose, which is not the emulator's ledger-rule vocabulary.