fix(bot): report a dead autoplay replenish at error level
Closes #1995.
Problem
trackHandlers.ts:204-214 — when the first replenish fails, a retry is scheduled 5s later. If the retry also fails, autoplay has stopped for that guild and nothing will try again. It was only warnLog'd.
warn never reaches Sentry: LogService.warn() only calls addBreadcrumb (shared/src/utils/general/log/service.ts:163-167), and a breadcrumb is transmitted solely when some later error event fires. So the moment autoplay died was invisible unless something unrelated broke afterwards and happened to carry the crumb along.
Change
Raised to errorLog, and the message now states the consequence — Replenish retry failed — autoplay stopped for this guild — rather than just naming the failed call. Drops the warnLog import this left unused.
Not restructuring the retry itself. The issue floated awaiting it or adding a user-visible notice; both change behaviour (the retry is intentionally detached from the track-start path, and an in-channel notice needs a product decision about noise). Making the failure visible is the part that was unambiguously missing.
Full bot suite: 3154 passed, 1 skipped. Typecheck and lint clean.
Related: #1996 does not reproduce
While here I checked #1996, which claims void runSafelyAsync(...) at errorHandlers.ts:186-189 silently swallows recovery exceptions. It does not:
runSafelyAsync (errorHandlers.ts:129-139)
└─ logHandlerFailure (:113-119)
└─ safeErrorLog (:78-88)
└─ errorLog ← reaches Sentry
The catch already logs at error level with the message Player error event handler failed:, which is exactly what that issue asks for ("logs at error level (not silently)... so a failed recovery is distinguishable from a successful one"). Commenting there separately rather than folding a no-op change into this PR.
Summary by cubic
Reports the second consecutive autoplay replenish failure at error level so Sentry captures the event and we know autoplay stopped for the guild. Previously this logged a warning only, which added a breadcrumb sent only if a later error occurred.
- Logs with
errorLog(from@lucky/shared/utils) and a clearer message: “Replenish retry failed — autoplay stopped for this guild,” includingguildId. - Keeps retry behavior unchanged (first failure schedules a retry after 5s; after the second failure, no more retries).
- Removes the unused
warnLogimport.