Skip to content

fix(s3): log a missing object as a warning, not an error - #96

Merged
buzz-code merged 1 commit into
mainfrom
claude/s3-missing-key-warn
Nov 8, 2026
Merged

buzz-code merged 1 commit into
mainfrom
claude/s3-missing-key-warn

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

What

S3Service.getFileBuffer / getFileStream logged Failed to get file ... at error level, with a stack, for every missing key (NoSuchKey, NotFound, HTTP 404, "Key not found").

Callers that probe for optional files treat a missing key as a normal answer (they catch it and return null), yet every probe still produced an error entry. In production this was ~1,300 error entries in five days from one audio pipeline.

Change

  • A missing key now logs one warning line (File not found <bucket>/<key>), no stack.
  • Real failures (timeouts, access denied, ...) still log as errors.
  • The thrown S3 error: <message> is unchanged, so existing callers that match on it keep working.

Tests

yarn jest utils/s3: three new cases (NoSuchKey, 404 on stream, real failure still an error).

No consumer action needed after a submodule bump.


Generated by Claude Code

getFileBuffer/getFileStream logged "Failed to get file ..." at error level with a
stack for every NoSuchKey/404. Callers that probe for optional files (e.g. a
stored take that may not exist yet) treat that as a normal answer, so each probe
produced an error entry. A missing key now logs one warning line; real failures
still log as errors, and the thrown "S3 error: ..." message is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GTicqgTde92c75hERgg3v
@buzz-code
buzz-code merged commit b534ddc into main Nov 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants