Error handling
The best way to deal with errors is to use an error handler. An error handler connects to a module with the error handling route. When the module outputs an error, the error handling route activates and runs the error handler.
When all errors are handled, Make keeps scheduling scenario runs instead of disabling the scenario.
Setting up an error handling for our demo API
When you were trying your new search module, you were probably experiencing error 401, but you didn't know why was that, if you didn't check Integromat DevTool. Since Make offers advanced error handling, you should set your app the way, so you could understand what is wrong with your module/scenario right away and use error handlers.
Enter your search module into your scenario and create a new connection with a random API key, if you haven't done so before. You should see the error:

In DevTool, you should see this output:

We need to make sure the error from the body of the response is returned in the module's output as well.
As you learned before, error handling should take part in base, since it is an element, which is shared among all modules and remote procedures. Therefore, open base and replace the current code with the code below:
Now, go to your scenario again, and execute the search module. You should now see the detailed wording of the error:

Voila! You just learned all the basics of custom app development in Make!
If you want to continue in development of your custom apps, you can explore our docs and learn more!
Last updated