Processing HTTP request error

Hello everyone,

I am looking for your experience on this subject :

In this scenario, I make API request to get new auth token for the rest of my workflow. This is use in different scenario as well, and some time it runs at the same time, meaning the first that made the request ends up with a token that is now invalid.

What’s the best thing to do in these situation ?

  • Is it possible to run this step again only if an error has been encountered?
  • Can I start the entire run in case of error?
  • Should I instead add a new branch after this module than runs in case of a mistake and is a duplicate of the rest of my scenario ?

Besides, is it the best practice to add in all my scenario the same module to get refresh token from database, then make an api request to get a AUTH token ?
→ Wouldn’t it be better to have a sub scenario (if possible) that is called in all of my main scenario when a new token is needed?

Thank for the help
Lucas

Hey Lucas,

you can add an error handler on this module. The Break error handler will retry the module if an error happens for example. Or you can configure your own logic what to do if an error happens.