Conversation
JPeer264
requested review from
isaacs and
mydea
and removed request for
a team
September 21, 2026 13:12
Contributor
size-limit report 📦
|
The unhandled exception test of cloudflare-workers-send-to-sentry lost its event in about 3 of 67 runs. In those runs Cloudflare answered the request with a 500 while Workers Logs had no invocation for it, so the Worker never ran and nothing was sent. Both inspected cases were the first deployment of a Worker name. The test only checked the status, so it polled Sentry for three minutes for an event that did not exist. All three tests now send their request through fetchFromWorker, which resends until the Worker itself answers. A Worker that threw answers with status 500 and the body "error code: 1101", which sets it apart from a 500 that did not come from the Worker. Other answers are logged with status, cf-ray and body. deployed-worker, global-setup and global-teardown are now TypeScript modules, and the typecheck covers them and the tests, so the tests no longer import deployed-worker as `any`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…r answers The Worker code is checked with @cloudflare/workers-types, whose globals replace the Node types of Buffer and URL, so the Node side of the test app failed to typecheck in the same project. Check it in tsconfig.node.json with Node types only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…r answers Cloudflare sends its 1101 error page as HTML to Node's fetch and only sends the plain text `error code: 1101` to some other clients, so the strict body comparison never matched in the test. Read the error code from either format. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…r answers Cloudflare ends the plain text error body with a newline, and `$` without the `m` flag only matches at the very end of the string, so a plain text 1101 answer never matched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
JPeer264
force-pushed
the
test/cloudflare-send-to-sentry-flaky-unhandled
branch
from
September 22, 2026 09:43
ad7867e to
6ea1f58
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The unhandled exception test of cloudflare-workers-send-to-sentry lost its event in about 3 of 67 runs. In those runs Cloudflare answered the request with a 500 while Workers Logs had no invocation for it, so the Worker never ran and nothing was sent. Both inspected cases were the first deployment of a Worker name. The test only checked the status, so it polled Sentry for three minutes for an event that did not exist.
All three tests now send their request through fetchFromWorker, which resends until the Worker itself answers. A Worker that threw answers with status 500 and the body "error code: 1101", which sets it apart from a 500 that did not come from the Worker. Other answers are logged with status, cf-ray and body.
deployed-worker, global-setup and global-teardown are now TypeScript modules, and the typecheck covers them and the tests, so the tests no longer import deployed-worker as
any.