Skip to content

fix: resolve vscode type errors in API endpoints files#4555

Merged
qwerty541 merged 1 commit intoanuraghazra:masterfrom
qwerty541:fix_vscode_type_errors_endpoints_files
Oct 11, 2025
Merged

fix: resolve vscode type errors in API endpoints files#4555
qwerty541 merged 1 commit intoanuraghazra:masterfrom
qwerty541:fix_vscode_type_errors_endpoints_files

Conversation

@opheliagoldstein
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel bot commented Oct 11, 2025

@qwerty541 is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added stats-card Feature, Enhancement, Fixes related to stats the stats card. repo-card Issues related to the pin/repo card. lang-card Issues related to the language card. wakatime-card Issues related to the wakatime card. gist-card labels Oct 11, 2025
Copy link
Copy Markdown
Contributor Author

@opheliagoldstein opheliagoldstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

@qwerty541 qwerty541 requested a review from Copilot October 11, 2025 17:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR resolves TypeScript type errors in API endpoint files by improving error handling and type safety. The changes implement proper type checking and error handling patterns to eliminate VS Code type warnings.

  • Added a utility function for safely retrieving secondary error messages from error objects
  • Implemented proper type guards for error handling in catch blocks
  • Added TypeScript checking annotations to enable type validation

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/common/error.js Added retrieveSecondaryMessage utility function and TypeScript checking annotation
api/wakatime.js Updated error handling with type guards and proper secondary message retrieval
api/top-langs.js Updated error handling with type guards and proper secondary message retrieval
api/pin.js Updated error handling with type guards and proper secondary message retrieval
api/index.js Updated error handling with type guards and proper secondary message retrieval
api/gist.js Updated error handling with type guards and proper secondary message retrieval

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@qwerty541 qwerty541 merged commit 0849165 into anuraghazra:master Oct 11, 2025
7 of 8 checks passed
@qwerty541 qwerty541 deleted the fix_vscode_type_errors_endpoints_files branch October 11, 2025 17:57
harryzcy pushed a commit to harryzcy/github-readme-stats that referenced this pull request Oct 16, 2025
)

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
martin-mfg pushed a commit to stats-organization/github-stats-extended that referenced this pull request Nov 2, 2025
)

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
ghosind pushed a commit to ghosind/github-readme-stats that referenced this pull request Dec 30, 2025
)

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
zimya pushed a commit to zimya/github-readme-stats-cf that referenced this pull request Jan 13, 2026
)

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
piscis pushed a commit to piscis/github-readme-stats that referenced this pull request Feb 7, 2026
)

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gist-card lang-card Issues related to the language card. repo-card Issues related to the pin/repo card. stats-card Feature, Enhancement, Fixes related to stats the stats card. wakatime-card Issues related to the wakatime card.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants