I couldn't find a solution on how to handle the 404 response within a loop in Angular, so I'm reaching out for help here.
Here's the code snippet I'm working with:
for(let order of orders){
this.api.getURL(order.resource_url).then(data =>
this.detail = data;
);
// Do something with this.detail ...
}
If the request returns a 404 response, I need the loop to move on to the next order and check for a valid response. Any suggestions on how to achieve this?