In my image processing workflow, I am using the Remove.bg module to remove backgrounds from images.
If the module returns “[400] Could not identify foreground in image. For details and recommendations see https://www.remove.bg/supported-images.” I want the scenario to continue with the next module, using different input (from the output of the module before the remove.bg module instead of the remove.bg module). If it returns any other error, such as “[402] Insufficient credits”, I want the a message to be sent to a Slack channel and it is ok for the scenario to stop execution in that case.
When you add an error handler to a module, you can add any module you like on the error route. This includes routers, and between each module you can add filters just like you are able to in the main route. This way you can assign different actions for different error messages.