ncano
CDCloudflare Developers
•Created by Marius Gundersen on 4/24/2025 in #general-help
Snippet preview with an access protected page
Snippets are executed after Access, so you'll have to bypass Access for requests towards iframe that is using Snippets (using headers, different URL, cookie or something else): https://developers.cloudflare.com/ruleset-engine/reference/phases-list/
3 replies
CDCloudflare Developers
•Created by Ruxorly on 4/11/2025 in #general-help
JSON for a Custom Error Page
one thing to keep in mind is that Snippets is a request phase that runs after WAF, so unless your call that is blocked by WAF is a subrequest from Snippets, you won't be able to override the error coming from WAF using Snippets: https://developers.cloudflare.com/ruleset-engine/reference/phases-list/
4 replies
CDCloudflare Developers
•Created by Ruxorly on 4/11/2025 in #general-help
JSON for a Custom Error Page
if you are using WAF / Rate Limiting, same can be done via custom response there: https://developers.cloudflare.com/waf/custom-rules/create-dashboard/#configure-a-custom-response-for-blocked-requests
4 replies
CDCloudflare Developers
•Created by Ruxorly on 4/11/2025 in #general-help
JSON for a Custom Error Page
Custom Error Responses can return JSON for matching requests: https://developers.cloudflare.com/rules/custom-errors/create-api/#custom-json-response-for-all-5xx-errors
4 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
there are quite a few places where things could go wrong from the interop perspective, so they will need to narrow down where exactly that exception is thrown
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
i mean other dev platform products that the worker is calling
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
ping me if you don't get any update from support in a few days, i'll remind them to keep looking at it
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
another thing that i can confirm for now is that we haven't merged anything inside Snippets edge pipeline since February, so the change on March 18th might have happened in one of the dependencies that your Worker is calling (there are a few)
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
i've left my trace and findings in the support ticket #01433373 internally, but can confirm here that the id of the script that is throwing an exception is associated with your worker, not with your snippet
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
what is the worker doing that executes after snippets?
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
okay, so in the request flow Snippets execute first, and then request is passed to Workers
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
just to follow up on the question of versions, Snippets rules do have internal version management powered by Ruleset Engine (which we might expose later to customers), however in this particular scenario i meant Version Management product that is known to break Snippets
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
this is weird, we will take a look
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
sorry, the trace output doesn't contain anything abnormal. having one snippet enabled on some kind of path that i can access and run tests against would be very helpful — unless you're using version management, in which case unfortunately this is expected on dev and staging envs currently
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
are you using version management by any chance?
31 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
do you have any other snippet or worker triggering on the same request by any chance? anything weird in Trace output (https://developers.cloudflare.com/fundamentals/trace-request/) ?
i can't look up your rayIDs, but i can take a look if you ping me your zone or affected URL
31 replies
CDCloudflare Developers
•Created by inhumann on 3/11/2025 in #general-help
Cloudflare snippet
@inhumann, is this still happening for you? if so, could you send a HAR file and JS console log output my way please? 😉
8 replies
CDCloudflare Developers
•Created by arasseo. on 3/18/2025 in #workers-help
All Cloudflare Snippets are throwing errors
there was nothing wrong with Snippets backend or control plane for weeks, so the issue is specific to your code or account configuration. your code works if contact references are removed from the template.
31 replies