Error handling
Understanding Error States
When building scenarios in Iconnek, it's essential to plan for both success and failure conditions. The visual indicators on nodes provide immediate feedback on execution status:
Green light: Node is executing successfully
Red light: Node has encountered an error
Types of Errors
Iconnek provides two distinct ways for nodes to report errors:
Uncatchable Errors
These errors are only written to the log and appear in the Debug sidebar and log output. While visible for debugging purposes, you cannot create flows to handle them automatically.
Catchable Errors
When a node properly notifies the runtime of an error, you can use the Catch node to trigger error-handling flows. These errors can be programmatically managed within your scenarios.
Error Handling Tools
Catch Node
The Catch node is your primary tool for handling errors. When an error occurs, the Catch node receives a message with detailed error information in the msg.payload
property. This allows you to create sophisticated error handling logic.
Debugging Tools
Iconnek provides powerful debugging capabilities to help diagnose issues:
Terminal View: Displays real-time execution logs and error messages
Context Viewer: Allows you to examine the data state at different points in your scenario
Best Practices
When designing robust scenarios, consider:
What happens if external services (databases, APIs) become unresponsive?
Do you need retry logic for failed operations?
Should errors trigger alerts or notifications?
Are some errors actually expected events that need specific handling?
Remember that proper error handling is essential for creating reliable, production-ready integration scenarios that can gracefully manage unexpected situations.
Dernière mise à jour