Skip to content

fix: detecting diff error swallowing#332

Merged
andreabadesso merged 5 commits intomasterfrom
fix/detecting-diff-error-swallowing
Dec 23, 2025
Merged

fix: detecting diff error swallowing#332
andreabadesso merged 5 commits intomasterfrom
fix/detecting-diff-error-swallowing

Conversation

@andreabadesso
Copy link
Copy Markdown
Collaborator

@andreabadesso andreabadesso commented Dec 16, 2025

Motivation

The wallet-service-daemon got stuck in the detectingDiff state for 12+ hours on testnet-india (2025-12-15). Root cause analysis revealed that xstate silently swallows errors from invoked services when no onError handler is defined, and this behavior produces no logs in production mode (NODE_ENV=production). The metadataDiff invoke was the only one missing an onError handler.

Additionally, getDbConnection() was outside the try/catch block.

Acceptance Criteria

  • Add onError handler to detectingDiff invoke so errors transition to ERROR state instead of being silently swallowed
  • Move getDbConnection() inside try/catch in metadataDiff so connection errors are properly logged
  • Audit all other invoke states - confirmed all others already have onError handlers

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged
  • Make sure either the unit tests and/or the QA tests are capable of testing the new features
  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso changed the base branch from master to fix/short-term-skip-token-created December 16, 2025 13:55
@andreabadesso andreabadesso force-pushed the fix/detecting-diff-error-swallowing branch 2 times, most recently from 21e9cef to 34bc820 Compare December 16, 2025 14:16
@andreabadesso andreabadesso self-assigned this Dec 16, 2025
@andreabadesso andreabadesso added the bug Something isn't working label Dec 16, 2025
@andreabadesso andreabadesso moved this from Todo to In Progress (Done) in Hathor Network Dec 16, 2025
luislhl
luislhl previously approved these changes Dec 16, 2025
@github-project-automation github-project-automation Bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Dec 16, 2025
pedroferreira1
pedroferreira1 previously approved these changes Dec 16, 2025
@andreabadesso andreabadesso mentioned this pull request Dec 17, 2025
3 tasks
@andreabadesso andreabadesso changed the base branch from fix/short-term-skip-token-created to master December 18, 2025 14:04
@andreabadesso andreabadesso dismissed stale reviews from pedroferreira1 and luislhl December 18, 2025 14:04

The base branch was changed.

@andreabadesso andreabadesso force-pushed the fix/detecting-diff-error-swallowing branch from ff6eae6 to 1e4ba10 Compare December 18, 2025 14:06
@andreabadesso andreabadesso requested review from luislhl and pedroferreira1 and removed request for pedroferreira1 December 22, 2025 15:53
@andreabadesso andreabadesso merged commit cbf77ba into master Dec 23, 2025
1 check passed
@github-project-automation github-project-automation Bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Dec 23, 2025
@andreabadesso andreabadesso mentioned this pull request Jan 28, 2026
2 tasks
@andreabadesso andreabadesso moved this from Waiting to be deployed to Done in Hathor Network Jan 28, 2026
This was referenced Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants