Skip to content

Commit db9408f

Browse files
committed
fix(protocol): add literal discriminator to ScheduleValidationError
httpapi-codegen requires every HttpApi error class to declare a literal `name`/`_tag` field (see declaredErrorFields in packages/httpapi-codegen). ScheduleValidationError was the one error class missing it, which fails bun run check:generated with "Promise error must have a literal discriminator: server.schedule.schedule.create". Matches the existing ProjectCopyError pattern. Closes #245
1 parent 3ec2370 commit db9408f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/protocol/src/groups/schedule.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/un
44
import { LocationQuery, locationQueryOpenApi } from "./location"
55

66
export class ScheduleValidationError extends Schema.ErrorClass<ScheduleValidationError>("ScheduleValidationError")(
7-
{ message: Schema.String },
7+
{ name: Schema.Literal("ScheduleValidationError"), message: Schema.String },
88
{ httpApiStatus: 400 },
99
) {}
1010

0 commit comments

Comments
 (0)