Handling Errors

There are three types of errors.

  • Validation errors: These errors occur during the validation process.
    • Example: An operation configuration with an account that doesn’t exist.
  • Preview errors: These errors occur during the preview process.
    • Example: A conversion operation with an amount too small to convert.
  • Execution errors: These errors are the same as preview errors but are received after execution.

Errors appear as an integral part of the operation if one of the processes below fails to complete:

ProcessPhaseError TypeError Location in Schema
Configuration validationDuring WFC creation processValidation errorconfigOperations[n].validationsFailure
Execution validation processDuring WFE creation processValidation errorexecutionOperations[n].validationsFailure
Execution preview processDuring WFE creation processPreview errorexecutionOperations[n].preview.failure
Execution processAfter launching the WFExecution errorexecutionOperations[n].execution.failure

The error schema is constant. Both validation and execution errors are composed of reason (which is a closed set of possible error reasons) and data (which, in most cases, is an open object that might contain additional error data).