Skip to content

Missing Slot 不要 Throw Error#231

Merged
mirumodapon merged 1 commit into
mainfrom
fix/missing-slot
Jun 29, 2026
Merged

Missing Slot 不要 Throw Error#231
mirumodapon merged 1 commit into
mainfrom
fix/missing-slot

Conversation

@mirumodapon

@mirumodapon mirumodapon commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

closed #229

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of missing schedule slots: slot parsing no longer fails hard when a slot is absent.
    • Instead, it logs an error and returns a nullable result, preventing a single missing slot from interrupting the overall workflow.

Copilot AI review requested due to automatic review settings June 29, 2026 20:25
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: df44f3c6-22ea-4a95-8563-6eba34a18105

📥 Commits

Reviewing files that changed from the base of the PR and between 508a876 and 8f3ee5a.

📒 Files selected for processing (1)
  • server/utils/pretalx/parser.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • server/utils/pretalx/parser.ts

📝 Walkthrough

Walkthrough

parseSlot now logs and returns null when a slot is missing instead of throwing an exception.

Changes

parseSlot failure mode change

Layer / File(s) Summary
parseSlot: throw → null on missing slot
server/utils/pretalx/parser.ts
The slot-not-found branch replaces createError(...) with console.error(...) and return null.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A slot went missing in the night,
I logged it softly, stayed polite.
No crash, no fuss, just null in sight,
The parser hops along just right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: handling missing slots without throwing.
Linked Issues check ✅ Passed The change supports sessions with no matching slot by returning null instead of throwing, matching issue #229.
Out of Scope Changes check ✅ Passed The diff only changes missing-slot handling and adds logging, with no unrelated behavior changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/missing-slot

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts Pretalx slot parsing in the Nuxt/Nitro server utilities so that sessions can be processed even when Pretalx data temporarily lacks a slot mapping (common while the schedule is still being arranged), addressing issue #229.

Changes:

  • Change parseSlot to no longer throw when a slot ID cannot be resolved.
  • Log the missing-slot condition and return null instead.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 77 to +79
if (!slot) {
throw createError(`Slot not found: ${slotId}`)
console.error(`Slot not found: ${slotId}`)
return null

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 508a8769df

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (!slot) {
throw createError(`Slot not found: ${slotId}`)
console.error(`Slot not found: ${slotId}`)
return null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject sessions whose referenced slot is missing

When Pretalx returns a confirmed submission whose slots[0] points to a slot record that is absent from pretalxData.slots.map, this now returns null; the list endpoint drops that session, but server/api/session/[id]/index.get.ts continues with optional chaining and returns a 200 response with missing room/start/end. That makes a dangling-slot session accessible as an incomplete detail/API response even though it is absent from the schedule, so the detail route should treat a null slot like the existing “Slot not found” case or otherwise filter it consistently.

Useful? React with 👍 / 👎.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

@mirumodapon mirumodapon merged commit d096cff into main Jun 29, 2026
2 checks passed
@mirumodapon mirumodapon deleted the fix/missing-slot branch June 29, 2026 20:40
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.

議程對應不到 slot

2 participants