Dealing with expired API token (retry flow)

I'm working with an API that is about to implement refresh tokens. The new tokens will not include an expiry date so the client is expected to simply refresh the token when an API call fails due to the token being expired, and then re-run the API call.

Is there an easy way to deal with this in Xano?

If not, does anyone have any recommendations on how they would deal with this 'manually' in the function stack? Would it just be a matter of an IF condition that catches the error and then run the API call again? Can I do this with a loop somehow so I don't have to duplicate the API call?
Working with APIs
3 replies