Webhook Error Overview

Errors, including legacy, system, and step.

MetaMap uses webhooks to send errors during the validation process. The errors use the following schema:

const error: {
  type: {{type string}};
  code: {{code string}};
  message: {{message string}};
};

The three parameters are:

  • type: Error type in Pascal case
    • LegacyError: Refers to older records that cannot migrate and with ill-defined error codes.
      error {
        type: 'LegacyError',
        code: 'legacy.error',
        message: '<any>'
      }
      
    • SystemError: Refers to system-related issues, such as service interruptions or internal errors
      Service Unavailable
      error {
        type: 'SystemError',
        code: 'system.serviceUnavailable',
        message: 'Service Unavailable'
      }
      
      Internal Error
      error {
        type: 'SystemError',
        code: 'system.internalError',
        message: 'Internal error'
      }
      
    • StepError: Refers to an issue with a validation step
  • code: Error code in the format {namespace}.{camelCase} for i18n
  • message: String that describes the error