feat(api): distinguish between not enrolled and not found user statuses

This commit is contained in:
shay
2026-05-03 20:38:21 -04:00
parent 954f259b8f
commit 50dd73a0de
3 changed files with 17 additions and 2 deletions
+9 -1
View File
@@ -152,11 +152,19 @@ export default function App() {
setFetchDone(true)
return
}
if (r.status === 404 || status === 'not_found') {
if (status === 'not_found') {
// Fetcher confirmed the user doesn't exist on GitHub.
setFetchError('User not found')
setFetchDone(true)
return
}
if (r.status === 404) {
// 404 without status==='not_found' means the user simply isn't
// enrolled yet (no settings row). Keep the demo data on screen
// and stop polling — no error to display.
setFetchDone(true)
return
}
if (r.status === 429 || status === 'rate_limited') {
setFetchError('Enrollment limit reached — try again tomorrow')
setFetchDone(true)