Skip to content

guard against crash on transient session failure#162

Merged
mfwolffe merged 1 commit intoLab-Lab-Lab:mainfrom
espadonne:main
Apr 2, 2026
Merged

guard against crash on transient session failure#162
mfwolffe merged 1 commit intoLab-Lab-Lab:mainfrom
espadonne:main

Conversation

@espadonne
Copy link
Copy Markdown

Summary

  • When /api/auth/session returns 503 (transient Cloudflare issue), makeRequest returns {} with no token
  • The empty object was truthy, so setStepCompletions(undefined) was called, crashing the next render when accessing stepCompletions["3"]
  • Fix: if (updatedProgress)if (updatedProgress?.step_completions)

makeRequest returns {} when session token is missing (503 from
/api/auth/session). The truthy {} passed the if-check and set
stepCompletions to undefined, crashing on next render.
@mfwolffe mfwolffe merged commit e5a8e43 into Lab-Lab-Lab:main Apr 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants