Skip to content

Improvement: Distinguish Between "API Error" and "User Not Found" #353

Closed

Description

@Yashaswini-K-P

Description

Currently, analyze-inactivity.js treats all fetchData failures as "unreachable." This is problematic because it fails to distinguish between a temporary network/server issue (500 Error) and a permanent issue where the user account no longer exists (404 Error).

Proposed Solution

Modify fetchData to return the HTTP status code. The inactivity analysis should categorize these failures:

  1. 500/503/429 (Temporary): Keep the user in the list to be checked again.
  2. 404 (Permanent): Flag the user as "invalid" and add them to a separate report for cleanup or manual verification.

Implementation Details

  • Update fetchData to return an object containing { data, status } rather than just null.
  • Update the logic in the main loop to handle status === 404 separately.
  • Create an invalid-users.json or update the final output object to include an invalidUsers array.

Benefits

  • System Maintenance: Automatically identifies broken accounts that need to be removed or updated.
  • Resource Efficiency: Avoids repeatedly polling for usernames that will never return a successful response.

Activity

  1. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    Thank you for opening an issue.

    Please review our CONTRIBUTING.md guidelines before getting started.

    A maintainer will review this issue shortly. If you would like to work on the issue yourself, please leave a comment requesting assignment.

    Issue Assignment Policy

    • The issue creator is given the first priority to work on their issue.
    • If the creator declines or does not request assignment, the issue will be assigned to others in the order of requests received.
    • Please do not submit PRs or begin work until you are officially assigned.

    Note: This project is currently maintained by a solo maintainer, so reviews, assignments, and responses may sometimes take a little time. Thanks for your patience.

  2. TanCodeX commented on Jul 25, 2026

    @TanCodeX

    Please assign me this under gssoc'26.

  3. jagdish-15 commented on Jul 28, 2026

    @jagdish-15
    Collaborator

    It makes sense, and I'm generally in favor of the idea. However, instead of creating a separate file, I think we can expand the existing invalid-users.json to include these users. A manual verification step would also be preferable to removing users directly, as it gives us a chance to confirm the account status before taking any action.

  4. added
    level:intermediate
    Backend
    on Jul 28, 2026
  5. github-actions commented on Aug 12, 2026

    @github-actions
    Contributor

    This issue has been inactive for 14 days and has been marked as stale. To keep this issue open, please leave a comment.

  6. Yashaswini-K-P commented on Aug 12, 2026

    @Yashaswini-K-P
    ContributorAuthor

    working

  7. github-actions commented on Aug 27, 2026

    @github-actions
    Contributor

    This issue has been inactive for 14 days and has been marked as stale. To keep this issue open, please leave a comment.

  8. Yashaswini-K-P commented on Aug 27, 2026

    @Yashaswini-K-P
    ContributorAuthor

    linked pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Backendlevel:intermediatetype:performance

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions