You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check:generated fails on dev: ScheduleValidationError missing literal discriminator #245
bun run check:generated (part of the unit (linux)/unit (windows) CI jobs) fails with:
error: Promise error must have a literal discriminator: server.schedule.schedule.create
at assertPromiseEndpoint (packages/httpapi-codegen/src/index.ts:296:13)
This was masked on dev until now because CI was failing earlier, at the formatMinutes unit-test step (see #236/#237), so check:generated never ran far enough to reach this. Once that's fixed, this surfaces on every PR.
Root cause
ScheduleValidationError in packages/protocol/src/groups/schedule.ts is missing the literal discriminator field (name or _tag) that httpapi-codegen's declaredErrorFields() requires on every HttpApi error class:
Every sibling error class (e.g. ProjectCopyError in packages/protocol/src/groups/project-copy.ts) declares name: Schema.Literal("<ClassName>") as a field. ScheduleValidationError is the one outlier.
Fix
Add the name literal field to ScheduleValidationError, and pass name: "ScheduleValidationError" at both construction sites in packages/server/src/handlers/schedule.ts (matches the ProjectCopyError pattern exactly).
Activity
fix(protocol): add literal discriminator to ScheduleValidationError
fix(server): pass name discriminator to ScheduleValidationError
alltomatos commentedon Sep 15, 2026
Fixed in commit 60ec4c3 and types regenerated in commit 6d262e1 by adding
ame: Schema.Literal('ScheduleValidationError').