C1000-138 practice question 12 of 15

What can be done to make sure all errors are caught within an assembly?

Full set: 60 questions
Answer options
A: Create an invoke that collects information on all causes from a service.
B: Add a default catch. Correct answer
C: The errors provided cover all possible causes, and nothing needs to be done.
D: Tweak the assembly with logical policies to ensure all possible cases are covered.
Correct Answer:
B. Add a default catch.
Explanation

In an API Connect assembly, error handling is managed using catch blocks. While you can create specific catch blocks to handle known, named errors (e.g., MyCustomError), it is impossible to anticipate every potential runtime failure. To ensure that any unhandled error is caught and managed gracefully, you can add a final catch block at the end of your error handling sequence that does not specify an error name. This configuration acts as a default or "catch-all" error handler, trapping any error that was not matched by a preceding, more specific catch.

Why Incorrect

A. An invoke policy calls an external service; it is an action within a flow and not a mechanism for catching errors from other policies.
C. It is a flawed assumption that default error definitions cover all possibilities. Unexpected system, network, or backend issues can occur.
D. While logical policies are crucial for flow control, they cannot preemptively trap all unexpected runtime errors that might occur during assembly execution.

References

- IBM API Connect v10.x Documentation, "Handling errors in the assembly". The documentation explicitly states: "...you can configure a default catch to handle any errors that are not handled by a specific catch. A default catch is one for which you have not specified an error name."

Scroll to Top