fix: resolve typescript errors by correcting imports, updating DTOs, … - #524
Open
akinboyewaSamson wants to merge 2 commits into
Open
fix: resolve typescript errors by correcting imports, updating DTOs, …#524akinboyewaSamson wants to merge 2 commits into
akinboyewaSamson wants to merge 2 commits into
Conversation
…refining types, and adding missing Prisma service methods.
|
@akinboyewaSamson 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! 🚀 |
Contributor
|
resolve you conflicts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #488
Description This PR fixes a critical syntax error in src/notifications/notification-retry-queue.service.ts that was accidentally introduced during a previous merge (#483) where the catch block of processInProcess was overwritten by an inner retry loop. This broke the TypeScript compiler across the entire project (failing with TS1472: 'catch' or 'finally' expected) and caused the notification module tests to crash.
Additionally, this PR fixes several pre-existing typing and pathing errors across the dev branch to ensure npm run typecheck exits cleanly (0), unblocking all CI pipelines and future development.
Changes Made
Notifications:
Removed the duplicate inner loop in NotificationRetryQueueService.processInProcess.
Restored the missing catch block to correctly capture lastError, record the failure state in the database, compute exponential backoff delays, and sleep.
Testing:
Updated test/unit/notification-retry-queue.service.spec.ts with explicit cases verifying that the dispatcher is called exactly attempts times when every attempt throws, and exactly once when the first attempt succeeds.
Global Types & Config:
Fixed broken DTO import paths in analytics.service.ts and admin-disputes-paginated-response.dto.ts.
Refactored ReadinessResponseDto in the Swagger configuration to correctly nest DTO classes instead of invalid $ref schemas.
Corrected config tests in config.module.spec.ts to allow testing optional values safely.
Integrated the missing count handler into the in-memory Prisma client mock (prisma.service.ts) for testing reliability.
Fixed test paths to the bearer() auth helper.
Acceptance Criteria Verified
npm run typecheck exits 0 without any errors.
processInProcess contains exactly one retry loop.
The catch branch correctly captures lastError, evaluates attempts, and triggers backoff sleep logic.
test/unit/notification-retry-queue.service.spec.ts successfully runs and passes.
Dedicated test cases verify the exact dispatcher invocation counts on success and on repeated failure.