Category: Bug
Difficulty: High
Description
npm run typecheck fails on dev with a single error:
src/notifications/notification-retry-queue.service.ts(204,5): error TS1472: 'catch' or 'finally' expected.
PR #483 replaced the catch block of processInProcess with a second, complete copy of the surrounding for retry loop, pasted inside the try block at a different indentation level. The outer try is now left with no catch and no finally, so the file is not valid TypeScript.
The consequences beyond the syntax error: attempts and lastError are shadowed by inner redeclarations, the inner loop returns on first success so the outer loop is unreachable, and the if (attempt >= attempts) break; that follows the inner loop references an attempt that is out of scope.
This blocks the whole repository. Two unit suites abort with Test suite failed to run citing this file, and nothing that imports the notifications module can be built or tested.
Location
src/notifications/notification-retry-queue.service.ts
test/unit/notification-retry-queue.service.spec.ts
Example commits
fix(notifications): restore the catch block lost in the retry loop merge
test(notifications): cover per-attempt retry and dead-letter behaviour
Acceptance Criteria
Technical Notes
git show 55b94b9 -- src/notifications/notification-retry-queue.service.ts shows exactly what was removed; the pre-merge version of the catch block is in that diff and is the shape to restore.
Do not simply delete the inner loop. The deleted catch also wrote the per-attempt failure record, which is tracked separately in #490 and can be done in the same PR.
Out of scope: the BullMQ path, the dead-letter recording, and the backoff formula itself.
Before you start
- Set up with the steps in CONTRIBUTING.md. Node 22 is required (
.nvmrc), use npm ci rather than npm install, and copy .env.example to .env before running npx prisma generate — the Prisma config reads DATABASE_URL at load.
- Branch from
dev and open your pull request against dev. main is the released baseline.
- Tests that need an authenticated caller should use the
bearer() helper in test/auth-helper.ts, which mints a genuinely signed SEP-10 token. Do not send a raw Stellar address as a bearer token; that path was removed deliberately.
- You may cover more than one issue in a single pull request.
Category: Bug
Difficulty: High
Description
npm run typecheckfails ondevwith a single error:PR #483 replaced the
catchblock ofprocessInProcesswith a second, complete copy of the surroundingforretry loop, pasted inside thetryblock at a different indentation level. The outertryis now left with nocatchand nofinally, so the file is not valid TypeScript.The consequences beyond the syntax error:
attemptsandlastErrorare shadowed by inner redeclarations, the inner loopreturns on first success so the outer loop is unreachable, and theif (attempt >= attempts) break;that follows the inner loop references anattemptthat is out of scope.This blocks the whole repository. Two unit suites abort with
Test suite failed to runciting this file, and nothing that imports the notifications module can be built or tested.Location
src/notifications/notification-retry-queue.service.tstest/unit/notification-retry-queue.service.spec.tsExample commits
Acceptance Criteria
npm run typecheckexits 0.processInProcesscontains exactly one retry loop.catchbranch is restored: it captureslastError, breaks when attempts are exhausted, computes the backoff delay and sleeps.test/unit/notification-retry-queue.service.spec.tsruns rather than aborting, and passes.attemptstimes when every attempt throws, and exactly once when the first attempt succeeds.Technical Notes
git show 55b94b9 -- src/notifications/notification-retry-queue.service.tsshows exactly what was removed; the pre-merge version of thecatchblock is in that diff and is the shape to restore.Do not simply delete the inner loop. The deleted
catchalso wrote the per-attempt failure record, which is tracked separately in #490 and can be done in the same PR.Out of scope: the BullMQ path, the dead-letter recording, and the backoff formula itself.
Before you start
.nvmrc), usenpm cirather thannpm install, and copy.env.exampleto.envbefore runningnpx prisma generate— the Prisma config readsDATABASE_URLat load.devand open your pull request againstdev.mainis the released baseline.bearer()helper intest/auth-helper.ts, which mints a genuinely signed SEP-10 token. Do not send a raw Stellar address as a bearer token; that path was removed deliberately.