fix: resolve vscode type errors in API endpoints files#4555
Merged
qwerty541 merged 1 commit intoanuraghazra:masterfrom Oct 11, 2025
Merged
Conversation
|
@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. |
qwerty541
approved these changes
Oct 11, 2025
Contributor
There was a problem hiding this comment.
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.
harryzcy
pushed a commit
to harryzcy/github-readme-stats
that referenced
this pull request
Oct 16, 2025
martin-mfg
pushed a commit
to stats-organization/github-stats-extended
that referenced
this pull request
Nov 2, 2025
ghosind
pushed a commit
to ghosind/github-readme-stats
that referenced
this pull request
Dec 30, 2025
zimya
pushed a commit
to zimya/github-readme-stats-cf
that referenced
this pull request
Jan 13, 2026
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.
No description provided.