JSONError: No data, empty input at 1:1 ^ (Status code: 404 not found)

Hi,
I have a collection with 4 requests, where collection will run in loop endless with timeouts.

  1. Is to get token
  2. Is to place order
  3. Get all orders list
  4. Is to check newly ordered order is present in the order list (i.e 3rd request). Runs until match the new order is in the list and again iterates.

Iā€™m seeing below error in the 4th request when runs in loop and gets error after 2 or 3 iterations and my response body is in json format-
JSONError: No data, empty input at 1:1^
And, also when status is 404, error is not displayed even from try catch block while running the collection.

Below is the code snippet and error screenshot and Result console ended loop with 404 status

var body = pm.response.json(); // Parse the response
//pm.environment.set("Pref", body.OrderResultItems[0].PoReference); // Create reference Id
const maxNumberOfTries = 30; // Max number of tries 
if (!pm.environment.get("tries")) {
    pm.environment.set("tries", 1);
}
console.log("Retries " + pm.environment.get("tries") + " of " + maxNumberOfTries);

if (responseCode.code === 200){
    tests["Http status is 200"] = responseCode.code === 200;
try{
        if (body.OrderResultItems[0].PoReference != pm.environment.get('po_reference') && pm.environment.get("tries") < maxNumberOfTries) {
            const tries = parseInt(pm.environment.get("tries"), 10);
            pm.environment.set("tries", tries + 1);
            console.log("Ordered order not found in the result number:",pm.globals.get('result_number'));
            setTimeout(() => {}, 120000); // wait for 2 min before retrying
            postman.setNextRequest("GetOrderResults"); // retry the previous request
        } 

        else if (body.OrderResultItems[0].PoReference == pm.environment.get('po_reference') && pm.environment.get("tries") < maxNumberOfTries){
            pm.test("The response contains a valid PoReference,ArticleId,TotalItems & Ordered Date!", () => 
                {
                    //parse the response json and test 4 properties
                    pm.expect(body.OrderResultItems[0].PoReference).to.eql(pm.environment.get('po_reference'));
                    pm.expect(body.OrderResultItems[0].ArticleId).to.eql(pm.environment.get('article_id'));
                    pm.expect(body.OrderResultItems[0].TotalItems).to.eql(pm.environment.get('quantity'));
                    pm.expect(body.DateTime).to.eql(pm.globals.get('order_datetime'));
                })
            pm.environment.unset("tries");
            console.log("Ordered order found in OrderResult list and posting a new order after 1 min!");
            setTimeout (() => {}, 60000);
            postman.setNextRequest("GetToken");
        }

        else if (body.OrderResultItems[0].PoReference != pm.environment.get('po_reference') && pm.environment.get("tries") == maxNumberOfTries){
            console.log("Order not found in OrderResult in defined time(1 hour) frame and an email alert sent!");
            pm.environment.unset("tries");
            postman.setNextRequest("SendEmailAlert");
        }
    }
    catch(err){  
                console.log(err); 
                }
}

else if(responseCode.code !== 200){
    //record not found
       tests["Http status is 404"] = responseCode.code === 404;
try{
    pm.expect(body.OrderResultItems[0].PoReference).to.eql(pm.environment.get('po_reference'));
    //console.log("error occured");
    pm.environment.unset("tries");
    //postman.setNextRequest("SendEmailAlert");
    setTimeout(() => {}, 60000)
    postman.setNextRequest("GetToken");
    }
    catch(err){  
                pm.environment.unset("tries");
                pm.test("Error is: ", () => {throw new Error(e.message)}); 
                console.log(err); 
                }
}

Could I get help on this, please?