Understanding HTTP Error Handling in Make.com
Problem: HTTP Error Handling and Router Issue in Make.com
Recently, I encountered a peculiar issue while working on a scenario in Make.com. The scenario involved a router with three paths, two of which contained HTTP requests. I expected these paths to execute sequentially, as is the norm with routers. However, I wanted the scenario to stop if any of the HTTP requests failed, and I wanted to store the incomplete execution for manual resolution later.
What I noticed was that when I used the “Break” directive, the subsequent modules on the same path did not execute, but the other router paths did. This led me to question whether this was the expected behavior or if I was doing something wrong. I also wanted to know how to stop the scenario from executing other router paths and store the incomplete execution.
Solution: Manual Error Handling
After some research and testing, I found out that the behavior I observed was indeed expected. The “Break” directive only stops the subsequent modules within the same path. A router is designed this way so that if something stops in one path, the others continue with their execution.
To stop the scenario from executing other router paths and store the incomplete execution, there are two possible solutions:
- Run all the paths in serial without a router. This was not suitable for my current needs.
- Set an error variable and do not continue if something goes wrong. This involves adding a router in the error route, setting a variable where “error” is true next to the break, and checking the error variable in the last path. If there is an error, the last route will not continue.
However, there is a caveat with this solution. The state of everything gets saved with the “Break” handler. If you retry the scenario run, the error will still be true and the last route will still not continue.
I also tested the scenario with the “Rollback” directive. It stopped immediately but did not save any incomplete execution. Therefore, it seems that manual error handling is the only option in this case.
Conclusion
In conclusion, when working with routers and HTTP requests in Make.com, it is important to understand how the “Break” and “Rollback” directives work. If you want to stop the scenario from executing other router paths and store the incomplete execution, manual error handling seems to be the best solution. However, keep in mind that the state of everything gets saved with the “Break” handler, and retrying the scenario run will not change the error status.
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.