Errors

Schema and handling of transaction errors (source, code, cause) from enrichment services.

Transactions can include one or more errors. Each error has this general schema:

{
  "source": "counterparty",
  "code": "COUNTERPARTY_DETECTION_ERROR",
  "cause": {
    "message": "Counterparty detection error",
    "type": "Error",
    "stack": "Error: Counterparty detection error stack trace"
  }
}
  • source: the service that raised the error.
  • code: a stable service-specific error code.
  • cause: serialised error details (shape may vary by language/runtime).

Error scenario behaviour

If an error occurs while enriching a transaction, the transaction can still be sent from the egress topic. In these cases, some enrichment fields may be missing depending on the error. For example, a geolocation error may mean geotags are not present on the transaction.

Transactions are not always sent to egress when an error occurs. The scenarios below describe the expected behaviour.

ScenarioWhat happensSent to egressAction
Ingress mapping errorIngress mapping fails, so the transaction is not forwarded for further processing.NoCheck transaction against the ingress schema and try again. Contact Moneyhub support if issue persists.
Software error during enrichment processingProcessing usually continues, but some enrichment fields may be missing.YesNo action needed unless key data is missing. In these case retrying the transaction is often recommended.

There are other scenarios where the transaction may not be sent to egress, however the most common will be an ingress mapping error. If transactions are not being sent to egress and the schema has been verified, please contact Moneyhub support.

Error codes

Below are the possible error codes that may appear on transactions sent to the egress topic. Please note some errors mean that the transaction won't get sent to egress. Please see above for those scenarios.

Error codeDescription
CARD_PRESENCE_ERRORCard-present prediction could not be completed.
CATEGORISATION_ERRORTransaction categorisation could not be completed.
COUNTERPARTY_DETECTION_ERRORCounterparty detection could not be completed.
GEOLOCATION_ENRICHMENT_ERRORGeolocation enrichment could not be completed.
GEOLOCATION_ENRICHMENT_PREPARATION_ERRORGeolocation enrichment could not be prepared for processing.
GEOLOCATION_INSIGHT_MAPPING_ERRORGeolocation results could not be mapped onto the transaction.
GEOLOCATION_SOFT_ERRORA non-blocking geolocation issue occurred; processing continued.
WORKER_ERROROther error occurred in the service.