Commit Graph
1 Commits
Author SHA1 Message Date
Thomas DurieuxandClaude Opus 5.5 63343c871c fix: keep every thrown error code in the logs
The logger keeps errorCode only for allowlisted codes, and so does the
collector (sanitize.vrl). Both lists are maintained by hand, so codes
added since then were dropped and logged as a bare 400. Among them:
invalid_billing_expiration (billingError), invalid_auth_state
(appError), streamer_unreachable, github_unavailable, user_banned and
most billing and GitHub App codes, 41 in all.

scripts/generate-log-diagnostics.js now collects the codes passed to
AnonymousError, billingError and appError, plus codes assigned to an
errCode/code variable. It writes them to LOG_THROWN_ERROR_CODES, which
the logger accepts, and appends them to the collector's errorCode
allowlist. A test fails when a thrown code is missing from either list.

Regenerating also refreshes source function names that had gone stale
(jsDelivrFileUrl, ownerGitHubAccessRequired, ...), whose stack frames
the collector was dropping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 09:16:35 +00:00