Skip to content

onError Hook for EscrowMonitor - #254

Merged
meshackyaro merged 2 commits into
trustflow-protocol:mainfrom
connelevalsam:feat/issue-139
Aug 31, 2026
Merged

onError Hook for EscrowMonitor#254
meshackyaro merged 2 commits into
trustflow-protocol:mainfrom
connelevalsam:feat/issue-139

Conversation

@connelevalsam

@connelevalsam connelevalsam commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

closes #139

Summary
Implemented the onError hook for EscrowMonitor:
src/escrow/monitor.ts

  • Added onError(callback) method + public types (EscrowMonitorOnError, EscrowMonitorErrorContext with phase: 'fetch' | 'handler', plus event/handler for handler failures) with typedoc comments.
  • fetchFn failures: previously silently swallowed via .catch(() => []) — now try/catch that logs through logger.error and invokes onError(..., { phase: 'fetch' }).
  • Handler failures: previously caught and logged to a simple logger — now invokes onError(..., { phase: 'handler', event, handler }).
  • Existing consumers who don't register onError see unchanged polling/handler behavior.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@connelevalsam 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Route EscrowMonitor's swallowed handler/polling errors through SDKLogger with an onError hook

2 participants