Skip to main content
All CollectionsSupport
How to debug an API error
How to debug an API error

Debug an errors yourself in the Debugger & API Request History

Xano Support avatar
Written by Xano Support
Updated over a week ago

Xano enables you with the tools to build any unique use case you can imagine, with all that complexity sometimes we can make a mistake creating our business logic. However, Xano provides the tools necessary to help you find a mistake or error when it occurs so you can fix it and move on.

Debugger

Within the Xano platform, there is a Run & Debug button. This allows you to test your API endpoints (functions, tasks, and addons) quickly without having to leave Xano.

Include variable details during run lets you see details of each step of your function stack.

The Result came back with an error:

We can switch to the Debugger to see the variable details of what went wrong.

The last function shown in the function stack is where the error occurred. We now know where to look to correct the error.

The Debugger will also show details such as inputs, environment variables, the results of function stack item, and the inputs and variables at each step. This can provide insights if the data is different than what we were expecting at earlier stages in the function stack.

API Request History

API Request History is available for 24 hours when any API endpoint is called outside of Xano.

You can access the API Request History from three different levels:

  1. Workspace-wide from the Dashboard:

2. API group-wide from the API group settings:
โ€‹

3. An individual API endpoint from the single API endpoint view.

API Request history is very similar to the debugger. It details all the information of a live API call. It shows the status code, inputs, request headers, response headers, output, function stack runs, and timings.

If there is an error, check the output for the error message and, if applicable, the function stack results - the last function to run will be where the error occurred.

Input Errors

Input errors will provide a message that the error occurred in the input. Because the error happens in the input, no function stack items or variable details will be shown - because they never ran.

Did this answer your question?