···11import z from "zod/v4";
2233export class SchemaNoTitleError extends Error {
44- constructor(schema: z.ZodType) {
55- super(`Schema has no title metadata ${schema}`)
44+ constructor() {
55+ super(`Schema has no title metadata`);
66 }
77}
8899export const schemaTitle = (schema: z.ZodType) => {
1010 const meta = schema.meta();
1111 if (!meta?.title) {
1212- throw new SchemaNoTitleError(schema);
1212+ throw new SchemaNoTitleError();
1313 }
1414 return meta.title;
1515};