Minka Ledger Docs
References

Error reference

DateResponsibleChanges
November 3, 2022@Luis FidelisInitial version
February 10, 2023@Tomislav HermanRenamed error status to reason, classified error reasons in different categories which is reflected in the prefix. Added new error reasons for bridge, core and reorganized other by categories. Removed error classes examples since it’s outdated now, and also because this is client facing error reference where implementation details are not relevant. Reorganized errors in sections by category and descriptions.
June 14, 2023@Omar MonterreyAdded core.routing-failed and core.thread-size-exceeded errors
December 12, 2023@Luis FidelisAdded record.drop-rejected and core.bridge-unsupported-operation errors
February 20, 2024@Tomislav HermanAdded bridge.command-unsupported error
February 27, 2024@Omar MonterreyAdded core.limit-exceeded error
March 19, 2024@Luis FidelisAdded bridge.incorrect-fee error
May 10, 2024@Omar MonterreyAdded bridge.proxy-response-invalid error
July 11, 2024@Luis FidelisAdded record.labels-policy-violation error
October 9, 2024@Juan Pablo OttavianoAdded bridge.core-invalid-access and bridge.transfer-information-invalid errors

Authentication and Security errors

These errors are related to authentication and security access rules. Thrown when security credentials contained in request JWT are invalid or performing some action in ledger is forbidden for presented credentials.

These errors happen in API request processing so they have response HTTP status codes associated.

REASONDESCRIPTIONHTTP STATUS
auth.unauthorizedSecurity credentials and missing or the credentials presented are invalid or expired. Credentials are invalid when JWT signature is invalid or the JWT payload is invalid.401
auth.forbiddenPerforming an action in ledger or on record is not allowed with current security credentials based on the access rules.403

Cryptographic integrity errors

These errors are related to integrity of cryptographic entities: hashes, signatures and keys.

Validation which produces these errors happens in API request processing so they also have response HTTP status codes associated.

REASONDESCRIPTIONHTTP STATUS
crypto.hash-invalidReceived record hash doesn’t match the record.422
crypto.parent-hash-invalidReceived parent hash in update request doesn’t match the parent record.422
crypto.signature-invalidAny of received record signatures is invalid. Triggered by first invalid signature.422
crypto.signature-missingReceived record doesn’t have any signature.422

Generic API level errors

These errors happen in API request processing.

They originate from the first layer of request processing which is not aware of ledger record semantics and they also have response HTTP status codes associated.

REASONDESCRIPTIONHTTP STATUS
api.body-malformedInvalid request body format, can’t be parsed as JSON.400
api.query-malformedInvalid request query parameter format, used when the request parameters can’t be parsed.400
api.route-not-foundRequested method and path doesn’t exist404
api.request-timeoutRequest processing took too long.408
api.rate-limit-exceededNumber of requests exceeded the rate limit. Try again later.429
api.unexpected-errorUnexpected error when processing request.500

Record level errors

Errors related to ledger records. Used when something is wrong with requested or submitted records.

These errors happen in API request processing so they also have response HTTP status codes associated.

REASONDESCRIPTIONHTTP STATUS
record.not-foundRequested record by handle doesn’t exist in the ledger database.404
record.relation-not-foundRelated record referenced in the received record <record>.data.<relation> doesn’t exist in the ledger database.422
record.duplicatedRecord with same handle already exists in the ledger database.409
record.schema-invalidReceived record doesn’t match the expected record schema. Also used when request path or query params doesn’t match expected request schema.422
record.invalidRecord schema is correct but it cannot be processed by the server.422
record.drop-rejectedRecord drop cannot be processed by the server due to an internal validation.422
labels-policy-violationLabel(s) can not be processed due to policy violation422

Core ledger errors

These errors are thrown by the ledger core which handles intents and balance movements. Since the ledger core processes intents asynchronously ****in the background, these errors will not be sent in HTTP responses, so there are no HTTP status codes associated with this error group.

These errors are added to intent signature when they happen. Added signature will have custom.status = 'aborted' and custom.reason equal to one of the reasons in this reason group core.* and custom.detail with a message which explains error in more detail.

REASONDESCRIPTIONHTTP STATUS
core.source-invalidSource of balance movement can’t be resolved to valid wallet.N/A
core.target-invalidTarget of balance movement can’t be resolved to valid wallet.N/A
core.symbol-invalidSymbol of balance movement can’t be resolved.N/A
core.insufficient-balanceSource wallet of balance movement doesn’t have enough balance.N/A
core.intent-expiredIntent expired before all required signatures are collected. Signature with this reason is added to intent by a background job which periodically checks intents and aborts all which are still pending after predefined timeout.N/A
core.limit-exceededIntent execution exceeded a limit. Limits can be exceeded either by source or target wallet and for different reasons. The detail of the error will contain more details.N/A
core.bridge-prepare-failedBridge reported fail in prepare phase. When ledger core adds a signature with this reason it will set failId to the reason received in failed signature from a bridge.N/A
core.bridge-unreachableUnable to deliver prepare event to bridge. Used when all attempts defined by retry strategy failed.N/A
core.bridge-unsupported-operationUnable to send request to bridge because it doesn't support the operation.N/A
core.routing-failedWhen the routing of an intent couldn't be performed. For example when the target wallet has routes defined but none of them matches the current intent.N/A
core.thread-size-exceededWhen the routing of an intent is too depth. Used to avoid routing loops on wallets.N/A
core.unexpected-errorUnexpected error happened in ledger core when processing intent.N/A

External bridge errors

These errors are related to processing of entries on external systems or bridges in entry prepare phase. These errors also don’t have HTTP status codes associated since they happen in background when intent is processed by bridges.

Bridge needs to report an error by adding a signature to intent (included in entry) by calling ledger API

POST /v2/intents/:handle/sign

Signature needs to have have with custom.status = 'failed' , custom.reason equal to one of the reasons in this reason group bridge.* custom.detail with a message which explains error in more detail. Optional, but recommended, is the custom.failId which is reserved for reference of error in external system, usually error code or error class. This additional field is useful for having a reference for diagnostic purposes. Bridge can report just the errors from this error group, all other errors will be rejected by the ledger API.

StatusReasonDetail
N/Abridge.account-not-foundAccount referenced in entry does not exist in the bridge system.
N/Abridge.account-inactiveAccount referenced in entry is inactive in the bridge system, but it exists in the system.
N/Abridge.account-insufficient-balanceInsufficient balance on the account in the bridge system to perform the financial transaction specified in entry.
N/Abridge.account-limit-exceededAccount has enough balance but has already exceeded the transactional limit (for any period).
N/Abridge.entry-rejectedEntry was rejected for the referenced account. It can be either rejection of debit for the source, or rejection of credit for the target account.
N/Abridge.entry-hash-invalidHash of the received entry is invalid.
N/Abridge.entry-signature-invalidAny of received entry signatures is invalid. Triggered by first invalid signature.
N/Abridge.entry-signature-mismatchAll entry signatures are valid but there is no matching signature with the expected ledger key.
N/Abridge.entry-signature-missingReceived entry doesn’t have any signature.
N/Abridge.entry-schema-invalidReceived entry doesn’t match the expected schema. Returned in case when root or data fields don’t match the schema or the included intent doesn’t match the intent schema.
N/Abridge.entry-mismatchData received in entry doesn’t match the intent included in the entry. In case when source, target, amount or symbol in the entry doesn’t match the related claim in the intent.
N/Abridge.entry-duplicatedDifferent entry for same intent claim with same source or target was already received before. Used to reject double spending for the same intent. This error should not be reported when handling idempotency, meaning when the action with same handle is received multiple times.
N/Abridge.entry-timeoutToo much time passed from initiation of intent to receiving the entry which includes this intent.
N/Abridge.intent-hash-invalidHash of the intent in the received entry is invalid.
N/Abridge.intent-signature-invalidAny of signatures of the intent received in entry is invalid. Triggered by first invalid signature.
N/Abridge.intent-signature-missingIntent received in entry doesn’t have any signature.
N/Abridge.intent-unrelatedIntent received in entry can’t be recognized or correlated in the bridge. It can means that it’s not signed by expected key or the intent reference doesn’t exist in the bridge system.
N/Abridge.command-unsupportedBridge doesn’t support received command. For example if bridge can’t process abort of credit it will add proof to intent with status error and this reason and by doing that it will suspend intent abort process.
N/Abridge.fraud-detectedEntry was marked as fraud based on analysis of intent in the bridge.
N/Abridge.ledger-failedError happened when calling ledger API. If bridge needs to perform some api calls to ledger as a precondition to signing intent. Recommended to set the failId to the error reason received from ledger in the signature which reports the error.
N/Abridge.core-unreachableCan’t access the (banking) core system from the bridge. Usually if the core system is down for maintenance or has a regular scheduled downtime which sometimes is a normal behaviour of financial institutions.
N/Abridge.unexpected-core-errorGeneric error from the (banking) core system. If the error is received from the core system which can’t be classified as any of existing bridge errors. Recommended in related signature to set the failId to type identifier of internal core error (error code or class name or similar).
N/Abridge.unexpected-errorUnexpected error happened on bridge when processing entry. In case when error happens in the bridge process which handles the action and can’t be classified as any of existing bridge errors. Recommended to set the failId to error type identifier (error class name or similar) and detail to error message in the signature which reports the error.
N/Abridge.incorrect-feeBridge could not validate the fee of transaction or it is invalid.
N/Abridge.proxy-response-invalidResponse returned from the bridge for a proxied request is not valid. This can happen due to schema validation.
N/Abridge.core-access-invalidCant validate access to the (banking) core system
N/Abridge.transfer-information-invalid(Banking) core system cant validate transfer information received

On this page