Introduction

Introduction

Fault Handling

Fault Handling

Use fault handling to handle error conditions.
You can use the following methods to perform fault handling:
  • Use a boundary event to catch faults.
  • Use output fields or a Throw step to return faults.
For example, create a process that accepts two numbers as input and performs four mathematical operations on them: addition, subtraction, division, and multiplication.
If you do not enable fault handling and invoke the process with the numbers 5 and 0, you see an HTTP 500 error. This is because of division by zero. In addition, you do not see a result the addition, subtraction, or multiplication results.
If you enable fault handling and invoke the process with the numbers 5 and 0, you see the following response:
{"Sum":"5", "Difference": "5", "Product":"0"; "Quotient": "Fault"}

0 COMMENTS

We’d like to hear from you!