We are fetching orders with these filters
expand=lineItems,serviceCharge,discounts,credits,payments,refunds,payment.tender,lineItems.discounts,lineItems.modifications&limit=100&filter=modifiedTime>=1702394928524
and getting this in return
<html><body><h1>502 Bad Gateway</h1> The server returned an invalid or incomplete response. </body></html>
Same API calls are working fine in Production environment and works for 10-15% of the time in sandbox environment too and fails with 502 bad gateway for the rest of 80-85% if the time.