Some Regions are receiving 500 response from pages-workers

Custom Domain: https://ayakobot.com/ Pages Domain: https://9b910f5f.website-ylm.pages.dev/ Zone ID: d26ebba8706fcfe540790e4d8294625e Account ID: f87935672c78d6b7d1779e052cec234e Successful Response: https://pastebin.com/isWKehaB Error Response: https://pastebin.com/CWg0Fnhw (2x) All 3 Requests were done on the same build through the same domain but I did verify that they occur on x.pages.dev too What can cause this, can i even fix this?
5 Replies
Walshy
Walshy6mo ago
"SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON"
you're doing .json() but it's returning a html page
Lolo
LoloOP6mo ago
Then why is that error not occurring on the Successful response It's done to the same url
Walshy
Walshy6mo ago
couldn't say, not sure what you're fetching but i'd check that it returns a 200 and then try to parse json, it may be throwing an error or something
Lolo
LoloOP6mo ago
Solved The actual Issue was caused by CF's "Bot Fight Mode" and can be fixed by either disabling it, or switching to "Super Bot Fight Mode" which is a paid feature My API responded with Captcha Challenges because of it, causing it to throw errors on JSON parsing because it got a HTML page with the captcha in it CC: @Walshy | Deploying ^ for future reference. Thank you for the help
Walshy
Walshy6mo ago
good old bot fight mode, glad you got it resolved!
Want results from more Discord servers?
Add your server