Skip to content

Commit bd65ced

Browse files
Add structured log for failed alert threshold
Implemented a try/catch inside evaluatePriceAlertsForMovement (src/modules/alerts/alert.service.ts:132) that emits a structured logger.error with creator_id, ledger_sequence, new_price, error_message, and failed_at when the alert threshold check fails (e.g., database error reading alerts). Added optional ledger_sequence to the PriceMovement type so the log carries enough context for an operator to replay the check. The error is re-thrown after logging so existing error propagation is preserved. New tests verify the log is emitted with all fields on DB failure and is not emitted on success. Closed #510
1 parent 12ab713 commit bd65ced

3 files changed

Lines changed: 9376 additions & 7598 deletions

File tree

0 commit comments

Comments
 (0)