Exception catch block processor
Core v2.2.0
The
processor executes only when an exception occurs in the preceding
block. It provides access to error details via ${_error
} variable
and enables graceful error handling, logging, and recovery.
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<try>
<http url="https://unreliable-api.com/data"/>
</try>
<catch>
<log message="API request failed: ${_error}"/>
<var name="fallback_data">Default data</var>
</catch>
</config>
block