Testing functions with auth token extras
When we run and debug a function stack, we are able to paste in the auth token to use for this run.
However the same is not true for a function.
How can we test our functions with authToken's without needing to run the function stack that references that function?
Reason why this would be necessary is that there might be some steps in the function stack that use elements of the authToken (eg: extras), and we want to focus on debugging just the function, not the entire function stack.
Are there any workarounds for this?
Thanks.
Comments
-
I would make the extras an input to the function, rather than trying to reference auth directly from the function. Then the API calls the function with the extras as parameter. This approach has better encapsulation, and gives you this testing optionality.
-
That's a novel idea @Ray Deck.
Thanks for your response.
I do find it strange however that we can't use auth token's within the debug mode, even though at runtime the Function is able to process them.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback