Skip to content

Fix unnecessary study plan fetch and 500 when no plan exists - #111

Merged
nilskntl merged 1 commit into
masterfrom
110-fix-unnecessary-study-plan-fetch-and-backend-500-when-no-plan-exists
Mar 21, 2026
Merged

nilskntl merged 1 commit into
masterfrom
110-fix-unnecessary-study-plan-fetch-and-backend-500-when-no-plan-exists

Conversation

@claude

@claude claude Bot commented Mar 21, 2026

Copy link
Copy Markdown

Summary

  • Guard useStudyPlan in ClassDetailPage.tsx with classData?.examDate so no API call is made when the class has no exam date set
  • Replace RuntimeException with EntityNotFoundException in StudyPlanService so GET /api/classes/{classId}/study-plan returns HTTP 404 (instead of 500) when no plan exists

Issue

Closes #110

Generated with Claude Code

- Guard useStudyPlan hook with classData?.examDate so the API call is
  skipped entirely when no exam date is set on the class
- Replace RuntimeException with EntityNotFoundException in
  StudyPlanService so a missing plan returns HTTP 404 instead of 500

Implements #110

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude claude Bot linked an issue Mar 21, 2026 that may be closed by this pull request
3 tasks done
@nilskntl
nilskntl self-requested a review March 21, 2026 00:28
@nilskntl
nilskntl merged commit e4f887f into master Mar 21, 2026
2 checks passed
@nilskntl
nilskntl deleted the 110-fix-unnecessary-study-plan-fetch-and-backend-500-when-no-plan-exists branch March 21, 2026 00:34
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.

Fix unnecessary Study Plan fetch and backend 500 when no plan exists

1 participant