Skip to content

Fix: log a failing widget once instead of on every request - #513

Merged
SandObserver merged 1 commit into
mainfrom
fix/widget-error-log
Oct 19, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/widget-error-log

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Add api/src/failure-log.js: tracks failures per key and logs the first failure, a changed reason, a reminder every 10 minutes with the failure count and start time, and one info line on recovery. Entries untouched for an hour are dropped.
  • Route widget-data refresh failures and recoveries through it, keyed by widget id and endpoint.
  • Add a quiet option to fail() and use it for widget-data, so a cached failure served to each tab is not logged again.

Testing
All green. Added unit tests for the tracker and an integration test that five failed requests log one line.

Changelog

Changed

  • Log a failing widget once, with a reminder every 10 minutes and a line on recovery, instead of on every request.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

Track widget-data failures per widget and endpoint. Log the first
failure, a changed reason, a reminder every 10 minutes with the failure
count, and one line on recovery. Stop fail() logging the same failure a
second time for widget-data.
@SandObserver SandObserver added the bug Something isn't working label Oct 19, 2026
@SandObserver
SandObserver merged commit 7bf2a66 into main Oct 19, 2026
6 checks passed
@SandObserver
SandObserver deleted the fix/widget-error-log branch October 19, 2026 05:17
stackyard-release Bot pushed a commit that referenced this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant