Snippet failing with 'exceededSnippetSubrequests'
We've been using snippets for a while to override frontend requests to fetch different assets, but we're now looking at doing this based on config from our API (with heavy caching on the responses).
I understand there's a limit of 2 subrequests for the Pro plan and that each redirect counts as a subrequest, but I still don't understand why this is triggering the exception. Upon testing, I don't hit any redirects and I've also set
To debug, I've been wrapping the snippet body in a
I understand there's a limit of 2 subrequests for the Pro plan and that each redirect counts as a subrequest, but I still don't understand why this is triggering the exception. Upon testing, I don't hit any redirects and I've also set
redirect: 'manual' to avoid this too.To debug, I've been wrapping the snippet body in a
try ... catch and printing out with console.error, and I see some that the document requests are successful, but intermittently, assets such as .js and .css files trigger this exception. But hitting the rewritten path directly (eg. curl -s -o /dev/null -D - ...) shows there's no redirects and it's just a 200 response, meaning I should be within the 2 sub-request limit.