© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•3y ago•
3 replies
kingmesal

Worker using fetch gets 522 from CF Pages Project

Here is my problem. User hits my pages website (origin), the javascript that is loaded hits the pages endpoint /api/data. /api/data internally is bound to a worker so the request is passed through to said worker. That worker runs some business logic then uses await fetch(origin/some-specific-path).

That fetch request is returning a 522 from the CF pages project.

Running this all locally works fine with the service binding via wrangler.

How do I resolve this?
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

522 on fetching from CF workers
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3mo ago
return 522 using fetch in a worker to request api of another worker
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Using CF Workers to deploy a static-built-vue-project to CF Pages
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago