feat: distinguish 404 permanent failures from temporary API errors - #535
feat: distinguish 404 permanent failures from temporary API errors#535Yashaswini-K-P wants to merge 1 commit into
Conversation
|
Thank you for submitting a pull request. Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully. Formatting and Branching
|
jagdish-15
left a comment
There was a problem hiding this comment.
I checked the API behavior, and it doesn't return a 404 for an invalid/expired username. It returns 200 OK with an errors array containing "That user does not exist."
Because of this, the current implementation won't detect invalid users correctly. profile will still be truthy, so the 404 branch is skipped and the missing submissionCalendar can cause the user to be incorrectly classified as inactive.
Description
Updated
scripts/analyze-inactivity.jsto distinguish between temporary API errors and permanent account deletions, routing404errors intoinvalid-users.jsonfor manual verification.Linked Issue
Fixes #353
Changes Made
fetchDatato return{ data, status }.invalid-users.json.404permanent account failures from temporary network/server failures in the sync loop.Type of Change
Testing
Checklist
npx prettier --write .before submittingfeature/*branch, not themainbranchScreenshots / Screen Recording
N/A (Backend synchronization logic update)