Skip to content

fix: log errors on move failures so they appear in Cloudflare Logs - #266

Merged
kptdobe merged 1 commit into
mainfrom
fix/move-silent-500-logging
Apr 29, 2026
Merged

kptdobe merged 1 commit into
mainfrom
fix/move-silent-500-logging

Conversation

@kptdobe

@kptdobe kptdobe commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Both move_failed (S3 list error) and partial_failure (per-file copy rejection) returned 500 silently with no console.error, producing empty Logs[] in Cloudflare Worker execution logs
  • ~155 silent 500s observed over 7 days — impossible to diagnose root cause from logs
  • Fix: log the error in both failure paths so the cause appears in Cloudflare Worker logs

Test plan

  • New test: logs the error when S3 list throws — asserts console.error is called on move_failed; confirmed failing before fix
  • New test: logs the error when a file copy rejects — asserts console.error is called on partial_failure; confirmed failing before fix
  • All existing move tests continue to pass (status codes and body unchanged)
  • npm run lint && npm test — 0 failures

🤖 Generated with Claude Code

Both the move_failed (S3 list error) and partial_failure (per-file copy
rejection) paths returned 500 silently with no console.error, producing
empty Logs[] in Cloudflare Worker execution logs and making it impossible
to diagnose the root cause in production (~155 silent 500s in 7 days).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Apr 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kptdobe
kptdobe merged commit 84ac28f into main Apr 29, 2026
6 checks passed
@kptdobe
kptdobe deleted the fix/move-silent-500-logging branch April 29, 2026 10:45
adobe-bot pushed a commit that referenced this pull request Apr 29, 2026
## [1.6.1](v1.6.0...v1.6.1) (2026-04-29)

### Bug Fixes

* log errors on move failures so they appear in Cloudflare Logs ([#266](#266)) ([84ac28f](84ac28f))
@adobe-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 1.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants