Skip to content

fix: resolve typecheck errors across the repository#505

Merged
Harxhit merged 2 commits into
Dev-Card:mainfrom
Harxhit:fix/repo-typecheck
Jun 7, 2026
Merged

fix: resolve typecheck errors across the repository#505
Harxhit merged 2 commits into
Dev-Card:mainfrom
Harxhit:fix/repo-typecheck

Conversation

@Harxhit

@Harxhit Harxhit commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Resolved repository typecheck issues related to card routes and services. Updated error handling in card deletion flows and aligned tests with the current service behavior to ensure consistent API responses.

Closes #


Type of Change

  • Bug fix
  • New feature
  • Refactor (no functional change)
  • UI / Design change
  • Tests only
  • Documentation
  • Infrastructure / DevOps
  • Security

What Changed

  • Updated src/services/cardService.ts to improve delete-card error handling and service behavior.
  • Updated src/routes/cards.ts to properly map service-level errors (NOT_FOUND, LAST_CARD) to HTTP responses.
  • Updated src/__tests__/cards.test.ts to validate the revised delete-card behavior and ensure typecheck/test compatibility.

How to Test

  1. Run npm run typecheck and verify there are no TypeScript errors.

  2. Run npm run test src/__tests__/cards.test.ts and verify all card route tests pass.

  3. Test card deletion scenarios:

    • Delete a non-existent card and verify a 404 response.
    • Attempt to delete the last remaining card and verify a 400 response.
    • Delete a valid card and verify a 204 response.

Checklist

  • My code follows the project's coding style.
  • TypeScript compiles without errors.
  • I have added or updated tests for the changes I made.
  • All tests pass locally.
  • I have updated documentation where necessary.
  • No new console.log or debug statements left in the code.
  • Breaking changes are documented in this PR description.

Additional Context

These changes were made as part of repository-wide typecheck cleanup and to ensure route handlers correctly translate service-layer errors into appropriate HTTP responses.

@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

@Harxhit is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

CI — All Checks Passed

Backend — PASS

Check Result
Lint PASS
Test PASS
Typecheck PASS

Mobile — SKIP

Check Result
Lint -
Test -

Web — SKIP

Check Result
Check -
Build -

Last updated: Sun, 07 Jun 2026 16:20:13 GMT

@Harxhit Harxhit requested a review from ShantKhatri June 7, 2026 16:22
@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label Jun 7, 2026
@Harxhit Harxhit merged commit e243c8c into Dev-Card:main Jun 7, 2026
5 of 6 checks passed
@Harxhit Harxhit added level:advanced Complex contribution involving deeper technical work. (+55 pts) quality:clean PR is well-structured, readable, and follows good practices. (×1.2 multiplier) type:performance Performance optimization (+15 pts) type:refactor Code refactoring/cleanup (+10 pts) type:bug Bug fixes (+10 pts) labels Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. level:advanced Complex contribution involving deeper technical work. (+55 pts) quality:clean PR is well-structured, readable, and follows good practices. (×1.2 multiplier) type:bug Bug fixes (+10 pts) type:performance Performance optimization (+15 pts) type:refactor Code refactoring/cleanup (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants