Skip to content

856: add check for optional#839

Merged
alfardil merged 2 commits intomainfrom
856
Mar 6, 2026
Merged

856: add check for optional#839
alfardil merged 2 commits intomainfrom
856

Conversation

@alfardil
Copy link
Collaborator

@alfardil alfardil commented Mar 6, 2026

856

Description of changes

Checklist before review

  • I have done a thorough self-review of the PR
  • Copilot has reviewed my latest changes, and all comments have been fixed and/or closed.
  • If I have made database changes, I have made sure I followed all the db repo rules listed in the wiki here. (check if no db changes)
  • All tests have passed
  • I have successfully deployed this PR to staging
  • I have done manual QA in both dev (and staging if possible) and attached screenshots below.

Screenshots

Dev

Staging

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Available PR Commands

  • /ai - Triggers all AI review commands at once
  • /review - AI review of the PR changes
  • /describe - AI-powered description of the PR
  • /improve - AI-powered suggestions
  • /deploy - Deploy to staging

See: https://github.com/tahminator/codebloom/wiki/CI-Commands

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Error Handling

The PR changes the error handling for a not-found leaderboard from throwing a ResponseStatusException to a custom LeaderboardException. It's important to verify that there is a global exception handler in place that correctly catches LeaderboardException and translates it into the appropriate HTTP status code (e.g., 404 Not Found) and response body, consistent with the existing API error patterns. If not, this change could result in a generic 500 Internal Server Error instead of the intended 404.

if (leaderboardRepository.getLeaderboardMetadataById(leaderboardId).isEmpty()) {
    throw new LeaderboardException("404 Not Found", "Leaderboard not found");

@alfardil
Copy link
Collaborator Author

alfardil commented Mar 6, 2026

/deploy

@alfardil alfardil enabled auto-merge (rebase) March 6, 2026 20:40
@alfardil alfardil merged commit 46dc95a into main Mar 6, 2026
35 checks passed
@alfardil alfardil deleted the 856 branch March 6, 2026 22:09
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