thunder-client-support
thunder-client-support copied to clipboard
Multiple pre requests for a single target
Is your feature request related to a problem? Please describe. Attempts to create multiple pre requests targeting the same request/action/target result in a circular dependency error.
- I have an
access_tokenrefresh request which requires a validrefresh_token. refresh_tokenandaccess_tokenexpire on a known schedule.- I have two collections a helper/reference collection and a sample collection.
- The sample collection PreReq calls
Reference -> Refresh Tokenevery X minutes - The sample collection PreReq calls
Reference -> Refresh Tokenonce OR ifaccess_tokenis empty (either of these creates the circular dependency error)
- The sample collection PreReq calls
- I want to call my
Reference -> Get Tokenrequest as a PreReq from myReference -> Refresh Tokenwhen either:refresh_tokenhas expired (Run every X minutes)refresh_tokenonce OR if it is not defined
Related #961
Describe the solution you'd like
I'd like to be able to create multiple pre requests for the same collection -> request target.
Describe alternatives you've considered
- PreReqs invisibly grouped on
collection -> request, evaluated in the order defined, and stop after the first match. - PreReqs have multiple execution conditions and stop after first match.
Your Team Size Using TC: 3-5
Hi @shawnferry
if you ignore the error, what happens? Will the access token and refresh token working for the remaining requests?
can you share screenshot of Pre-Run tab? just want to look at it?
Is it all requests causing circular error or only a particular single request?
If I ignore the error it fails continuously once the tokens have expired. If the access token is valid everything it emits the error and continues to work as desired.
If I then manually run either get token or refresh token it will start working again.

Hi @rangav
Is it all requests causing circular error or only a particular single request?
For the example collection every request has the error from the collection level Pre-Run. For the support collection only the refresh request has the error.
Thanks for sharing will look into it.
This happens with any request with multiple pre requests. One pre request works. Two pre requests results in no pre requests running.