Having issues with access to variables

Options
Modifying the WMX workflow.

I keep running into a problem with the error "Unable to locate var" in my Function Stack.

I know that the variable webflow_response.response.result._id exists from an earlier function item (an API call to create a new item in Webflow). I've even tested sending it to an external API I can monitor.

But when I try to use it in another function as part of my stack, my webhook bombs out with a 500 Internal Server error. When I look at the API call in detail, I get the message Unable to locate var: webflow_response.response.result._id.

What am I not understanding about how to put together these functions in the function stack? The editor seems to abstract away what's actually going on, so I'm not able to trouble shoot at this point without learning more.

Any pointers would be greatly appreciated. This seems like it should be a trivial thing.

Thank you!

Comments

  • Carlos Perez
    Options

    UPDATE / SOLUTION

    I found the issue to the problem to be that in testing as I was deleting sample members in Webflow, if I did not publish the site after emptying test member items, Webflow would respond with an error whenever I tried to re-create the same person. This is because I made a modification to the function stack to eliminate manually setting the SLUG value. Webflow would try to create a slug of the same value it had used before, and instead of handling it gracefully and creating a new, different (incremental) slug, it would try the same and simple respond to Xano with an error.

    I felt like I was chasing my tail. The bigger challenge seems to be that Xano doesn't expose any kind of history at the function level for me to dive in to each step along the way to see what's failing. Am I right, or are there tricks to troubleshooting function stacks?

    RESOLVED.
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Hey  Xano does provide debugging details. If you are testing in Xano, before clicking Run select the checkbox to include variable details. This will include step-by-step details in the debugger.

    For live API endpoint, we provide API request history for the previous 24 hours. You can view this on the dashboard or in the settings of an API endpoint single view