Skip to content

[Bug] Incomplete Error Handling in GitHub API Request Function #992

@yokedn

Description

@yokedn

Version

No response

Current Behavior

In the githubRequest function of the githubApi.ts file, the error handling logic is incomplete. When the API returns a non-JSON response or a network error occurs, the error is silently ignored and null is returned. This results in the loss of important error information, which hinders debugging and problem diagnosis.

Current Behavior:
All errors are silently ignored and null is returned.
Developers cannot distinguish between network errors, authentication errors, parsing errors, and other error types.
Non-JSON responses will cause parsing exceptions, but the error information is discarded.

Expected Behavior

Meaningful error information should be provided when an API request fails.
Check the response content type to ensure it is in JSON format.
Errors should be properly logged and propagated to facilitate debugging.

Environment

- OS:
- Browser:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategory issues or prs related to bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions