Skip to content

fix(frontend): reliability — timeout, 5xx retry, promise rejection handling, cache invalidation#1023

Merged
hman38705 merged 3 commits into
solutions-plug:mainfrom
abore9769:main
Jun 30, 2026
Merged

fix(frontend): reliability — timeout, 5xx retry, promise rejection handling, cache invalidation#1023
hman38705 merged 3 commits into
solutions-plug:mainfrom
abore9769:main

Conversation

@abore9769

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • npm test passes in frontend/ with all 57 unit tests green
  • Timeout test uses jest.useFakeTimers() / advanceTimersByTimeAsync — no real 10-second wait
  • Existing 5xx tests updated to mock all retry attempts; new test verifies two 502s then 200 succeeds
  • Cache invalidation tests confirm a mutation immediately followed by a GET fetches fresh data

closes #944
closes #945
closes #946
closes #947

… state

Adds void to the floating promise call in useEffect to make the async
intent explicit and prevent ESLint no-floating-promises warnings.
Adds tests verifying that promise rejections set the error state accessible
from the hook return value, and that non-Error rejections are normalized
into proper Error objects.

closes solutions-plug#944
Adds a tags field to cache entries and an invalidateByTags() method so
mutations can drop only the affected resource namespaces instead of
wiping the entire cache. Cache TTL time-based expiry is retained as the
fallback for entries that are never explicitly invalidated.

closes solutions-plug#947
…che invalidation

Timeout (solutions-plug#945): each fetch attempt is wrapped in a 10-second AbortController
timer. If it fires, an ApiError with code TIMEOUT_ERROR is thrown so callers
can surface a message distinct from generic network errors.

5xx retry (solutions-plug#946): GET (and explicitly idempotent) requests are retried up to
maxRetries times on transient 5xx responses with exponential back-off and
jitter. POST/DELETE are never retried unless marked idempotent.

Cache invalidation (solutions-plug#947): GET endpoints now record resource tags when caching.
Mutations use invalidateByTags() to drop only the affected namespaces instead
of clearing the entire cache with the catch-all pattern.

closes solutions-plug#945
closes solutions-plug#946
closes solutions-plug#947
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@abore9769 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@hman38705 hman38705 merged commit 284cd51 into solutions-plug:main Jun 30, 2026
5 of 18 checks 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

2 participants