Developer Debugging
Understanding how to debug your API and custom code issues is critical to be able to create successful automations that use the API or add custom features into your automations.
Looking for more general debugging tips? See How to debug.
# Testing the API
Postman and cURL are useful tools that can be used to test the API outside of your automation, or production system. Both are free options that can be used by individuals.
Learn more about the common errors of the API in the Troubleshooting | API Errors documentation.
# Testing custom code
Adding custom code to your automations can help you extend the functionality of Axiom.ai to meet your custom requirements, being able to debug this code is important.
# Console logging
Logging to the console is available when using the "Write Javascript" step. There are limitations to this, such as:
- Automations must be run using the desktop app - you will not be able to access the console for cloud runs.
- Due to the browser closing at the end of the run, a "Wait" step is recommended to give time to check the console.
# Conditional checks
Returning values from your custom code can allow you to build dynamic features into your automations. For example:
You have a script within the "Write Javascript" step that is to return an email address. When it runs into an error, you want it to return the string "no email found". However, you want the automation to behave differently when this string is returned. Add a Conditional Flow step to check for the "no email found" string and perform actions based on this.