const res = await fetch('https://api.txshield.xyz/api/simulate/execute-simulation', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer txs_your_api_key_here' }, body: JSON.stringify({ targetContractAddress, chainId })});const data = await res.json();if (!data.success) { switch (res.status) { case 400: console.error('Bad request:', data.error); break; case 401: console.error('No API key provided'); break; case 403: console.error('Invalid API key'); break; case 429: console.error('Rate limit hit — back off and retry'); break; case 500: console.error('TxShield server error — retry later'); break; default: console.error('Unknown error:', data.error); } return;}// Safe to use data here