# Error: sandbox: execution interrupted, bridge disconnecting

**URL:** <https://community.postman.com/t/error-sandbox-execution-interrupted-bridge-disconnecting/55115>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [November 29, 2023, 10:57am UTC](https://community.postman.com/t/error-sandbox-execution-interrupted-bridge-disconnecting/55115 "2023-11-29T10:57:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shilpa557](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@shilpa557](https://community.postman.com/u/shilpa557)\
**Post date:** [November 29, 2023, 10:57am UTC](https://community.postman.com/t/error-sandbox-execution-interrupted-bridge-disconnecting/55115/1 "2023-11-29T10:57:21Z")

</div>

**Scenario** :

**Get-** [**https://XXX/project/file/data/**](https://XXX/project/file/data/) **ProjectFileID/refresh**

**I need to loop this request (with some delay time 5 sec) until the status is processed in the response json.**

**Note 1: Status will be like first Processing and then Processed . If it is failed then it will be Error.**

**Note2: Loop should end when Status is Processed or Error .**

**Note 3 : Loop should continue when Status is in Processing .**

For this i tried below script -Here i am getting error as Couldn’t evaluate the test script: Error: sandbox: execution interrupted, bridge disconnecting and tool is closing"

let status = “Processing”;  
while (status === “Processing”) {  
const delay = 20000;

```
  pm.sendRequest('Get-https://XXXX.com/api/v3/project/file/data/FileID',function(err,res){
      if (err) {
  console.error('Error:', err);
  return;
}
status = response.json().Status;
if (status === "Processed" || status === "Error") {
  console.log('Status:', status);
  return; // Exit the loop
}

```

});  
}

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [November 29, 2023, 1:42pm UTC](https://community.postman.com/t/error-sandbox-execution-interrupted-bridge-disconnecting/55115/2 "2023-11-29T13:42:12Z")

</div>

Have a look at the following links.

[web api testing - Postman - how to loop request until I get a specific response? - Stack Overflow](https://stackoverflow.com/questions/43295102/postman-how-to-loop-request-until-i-get-a-specific-response)

[Retry a failing request - 🙋 Help - Postman Community](https://community.postman.com/t/retry-a-failing-request/5934)

Both are similar in that they use a proper request in the GUI with setNextRequest instead of sendRequest.

They also recommend a max number of retries to ensure you can’t get an infinite loop.

Something you might want to consider.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 29, 2023, 1:42pm UTC](https://community.postman.com/t/error-sandbox-execution-interrupted-bridge-disconnecting/55115/3 "2023-12-29T13:42:22Z")

</div>

Closed on December 29, 2023, 1:42pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
