502 error occurs when fetch is used within cloudflare worker or pages functions. But it's normal if you approach it directly. What's the cause?