Fetch request in worker results in 503 and 1200 error codes
In my worker code, I send a request to Anthropic's API using a
fetch request. Sometimes, it will return a 503 with the response body error code: 1200. When viewing the response headers from this failed request that I've logged, I can see there is a cf-ray header and the server header is set to cloudflare, which leads me to believe it is happening on Cloudflare's end.
I've looked at these links and other Community issues but do not understand what is happening. I added retries in my server logic as well but this does not help.
This started on Sept 24th.
Has anyone else seen this issue with their worker code? How do I go about fixing this? Specifically with sending a fetch request to a third party API and having this status and message return.
https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-503/
https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1200/Cloudflare Docs
Error 1200
This error indicates that the number of requests queued on Cloudflare's edge exceeds the limit.
6 Replies
Not just you -- also getting this for about 1-3% of outgoing fetches!
Good to know! Thanks for sharing. I'd say that's about the same % we are also seeing.
@hollowaya have you found this specifically when using Anthropic's API?
We're actually mainly getting this with Upstash. They confirmed they dont run cloudflare for our endpoints so it's on our worker end
@hollowaya have you been able to resolve this issue yet? if so, how? thank you in advance!!
Haven't yet, we tried retries with generous delay (e.g. 10s) but they have not solved it for us
Same here. Thank you!