fix(webapp): downgrade retryable directory-sync effect failures to warn#4200
Conversation
Directory-sync effects are idempotent and the accounts-webhook worker retries the whole event, so a single failed attempt (typically a role assignment losing a serializable race during a backfill burst) is self-healing rather than alert-worthy. Tag those thrown errors with logLevel "warn" so the worker logs at warn instead of error, keeping them visible for triage without paging.
|
WalkthroughAdds a helper function, retryableEffectError, in directorySyncEffects.server.ts that creates an Error object tagged with logLevel: "warn". This helper replaces plain Error throws in two failure paths within the applyEffect switch: the "provision" role overwrite failure and the "set_role" failure, changing the logging severity of these thrown errors used in the worker retry flow. No exported or public entity signatures are changed. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Directory-sync effects are idempotent and the accounts-webhook worker retries
the whole event, so a single failed attempt (typically a role assignment
losing a serializable race during a backfill burst) is self-healing rather
than alert-worthy. Tag those thrown errors with logLevel "warn" so the worker
logs at warn instead of error, keeping them visible for triage without paging.