Skip to main content

Errors

Errors

When the Sequence service encounters an error processing an SDK request, it will respond with:

  1. an HTTP status code
  2. a Sequence error code
  3. a Sequence error message
  4. a data object containing extra information (optional)

Some errors (as denoted in the table below) will instruct the SDK to auto-retry with an exponential backoff until a timeout. If it succeeds, it will not return the error, but if it reaches the timeout, it will return the error.

The SDKs manage idempotency of requests and retries. In most cases, it should not be necessary to implement your own retry logic in addition to what the SDKs provide.

If your application has an operation with multiple Sequence requests that fails partway through, it is safe to retry the step that failed and continue from there, but not necessarily safe to start over.

HTTP Status CodeSequence Error CodeSequence Error MessageAuto-retry
400SEQ008One or more fields are missingNo
400SEQ050Alias already existsNo
400SEQ051Provided fields are exclusive in respect to each otherNo
400SEQ052Invalid key IDNo
400SEQ200Quorum must be greater than 1 and less than or equal to the length of xpubsNo
400SEQ201Invalid xpub formatNo
400SEQ203Retrieved type does not match expected typeNo
400SEQ204Root XPubs cannot contain the same key more than onceNo
400SEQ600Malformed pagination parameter afterNo
400SEQ601Incorrect number of arguments to filterNo
400SEQ602Malformed query filterNo
400SEQ610Invalid intervalNo
400SEQ706*One or more actions had an error: see attached dataDepends on the error contained in the action
400SEQ707No actions specified for transaction builderNo
500SEQ708Unexpected item in transactionNo
400SEQ709Wrong number of signaturesNo
400SEQ710Transaction unbalancedNo
400SEQ711Transaction exceeds allowed runlimit. Use fewer actions.No
400SEQ735Transaction rejectedNo
500SEQ739Error retrieving transaction after submissionYes

Nested Errors

When making a transaction, errors will be returned for individual actions to make it easier to identify what went wrong. The following errors are returned as sub-errors of SEQ706 in the optional data field:

HTTP Status CodeSequence Error CodeSequence Error MessageAuto-retry
400SEQ701Invalid action typeNo
400SEQ702Invalid ID on actionNo
400SEQ703Invalid action objectNo
400SEQ704Invalid amount in actionNo
400SEQ760Insufficient funds for transactionNo
400SEQ761Some outputs are reserved; try againYes
400SEQ762Specified asset ID does not match asset ID in outputNo

Here's an example of accessing action errors in the SDK:

try {
new Transaction.Builder()
.addAction(
new Transaction.Builder.Action.Issue()
.setFlavorId("fake")
.setAmount(1)
.setDestinationAccountId("alice")
).transact(ledger);
} catch (APIException e) {
APIException actionError = e.data.actions.get(0);

System.out.println(actionError.getMessage());
// Code: SEQ702 Message: Invalid id on action

System.out.println(actionError.seqCode);
// SEQ702

System.out.println(actionError.data.index);
// 0, index of action that failed
}