what happens when you hit the subrequest limit, does fetch throw an error?
what happens when you hit the subrequest limit, does fetch throw an error?
fetch(url), and another 1000 to in-house things (KV, R2, DO, D1, you get the idea)try/catch around the subrequeste.name === "subrequest limit exceeded"?code, etc. but not everything does, sadlyError: AiError: undefined: ERROR 3040: Unknown internal errorfetch(url)try/catche.name === "subrequest limit exceeded"Error: AiError: undefined: ERROR 3040: Unknown internal errorexport default {
async fetch() {
try {
while (true) { await fetch("https://cloudflare.com/cdn-cgi/trace") }
} catch (e) {
return new Response(JSON.stringify(e, Object.getOwnPropertyNames(e)))
}
},
};{"stack":"Error: Too many subrequests.\n at Object.fetch (worker.js:15:28)","message":"Too many subrequests."}