Skip to content

fix(logging): log unknown-account listings at debug, not ERROR - #282

Merged
alukach merged 2 commits into
mainfrom
fix/accountlist-log-level
Nov 20, 2026
Merged

alukach merged 2 commits into
mainfrom
fix/accountlist-log-level

Conversation

@alukach

@alukach alukach commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

The account-listing handler (AccountListHandler in src/handlers.rs) now logs an unknown account (BucketNotFound, answered 404) at debug. Every other listing error is still logged at ERROR.

Asking for an account that doesn't exist is routine: GET /<account>?list-type=2 for a mistyped or retired name answers 404. The handler logged it as [ERROR] … AccountList(<account>) error: BucketNotFound("not found"). Because the account name was in the message, Workers Issues opened a new group for every name; five appeared on 2026-11-19 alone, each a single 404. Once M1 (Worker issues) delivers (#283), each would also page devops.

Only the 404 is quieted. Account listing calls the Source API as the proxy itself and never checks a client's signature, so any other error here is a fault on our side. That includes a 403, which would mean the API refused the proxy's own listing call. Those keep an ERROR line, now with account and error as structured fields under a fixed message, so they still reach Issues and M1. Every response, the 404s included, is still recorded in Analytics Engine.

Testing

cargo check and cargo clippy for wasm32-unknown-unknown pass, cargo fmt --check is clean, and the native test suite passes in the pre-push hook. No test covers the log level.

🤖 Generated with Claude Code

`GET /<account>?list-type=2` for an account that doesn't exist answers 404,
which is routine, but the handler logged it at ERROR with the account name in
the message. Every unknown account name became its own Workers Issue. Only a
5xx is now logged at ERROR; a 4xx is logged at debug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @alukach's task in 13s —— View job


✅ No blocking issues — safe to merge.

The change in src/handlers.rs:106-114 does what it says for the unknown-account case. ProxyError::BucketNotFound is logged at debug. Every other error is logged at ERROR with account and error as structured fields under a fixed message, so Workers Issues groups them by message instead of opening one group per account name. The HTTP response path is unchanged.

Non-blocking:

  • The PR description is out of date. It says a refused listing "(an unknown or forbidden account, answered with 404 or 403)" is logged at debug, and that ERROR is only for 5xx. The latest commit (b458f62) narrowed this. Only BucketNotFound is quiet now, and a 403 is still logged at ERROR. The code comment matches the code, so the description is the part to fix.
  • A 403 will still page. If the API often refuses the proxy for a retired or private account, those listings will still reach Issues and M1. Watch for that after merge. If it happens, add the specific variant to the matches!.
  • No test covers the log level. The PR notes this. It is acceptable for a one-branch logging change.

Simplify (ponytail)

Nothing to cut. The matches! branch is the minimum change.


💰 Estimated review cost: $0.08 · 0m12s · 4 turns

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚀 Latest commit deployed to https://source-data-proxy-pr-282.source-coop.workers.dev

  • Date: 2026-11-20T01:36:45Z
  • Commit: dfadab3

…at ERROR

A 403 here means the Source API refused the proxy's own listing call,
which is our fault and should still reach Workers Issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alukach alukach changed the title fix(logging): log refused account listings at debug, not ERROR fix(logging): log unknown-account listings at debug, not ERROR Nov 20, 2026
@alukach
alukach merged commit 550ebf7 into main Nov 20, 2026
22 checks passed
@alukach
alukach deleted the fix/accountlist-log-level branch November 20, 2026 04:14

This branch was successfully deployed

1 active deployment
preview — b458f620 Deployed Nov 20, 2026 by alukach via Deploy & Test / Deploy #499
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant