File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import extractStack from 'extract-stack';
66import { err , errAsync , Result , ResultAsync } from 'neverthrow' ;
77import stringifyObject from 'stringify-object' ;
88import type { IsNever , RequiredKeysOf } from 'type-fest' ;
9+ import type { z } from 'zod' ;
910
1011import { objectify } from './object.js' ;
1112import { indentLines } from './string.js' ;
@@ -197,6 +198,11 @@ const { OutOfRangeException } = new ExceptionBuilder()
197198 } )
198199 . build ( ) ;
199200
201+ export const { ValidationException } = new ExceptionBuilder ( )
202+ . setOptionsType < { details : { data : unknown ; issues : z . ZodIssue [ ] } } > ( )
203+ . setParams ( { message : 'Zod schema validation failed' , name : 'ValidationException' } )
204+ . build ( ) ;
205+
200206export type {
201207 ExceptionConstructor ,
202208 ExceptionConstructorArgs ,
You can’t perform that action at this time.
0 commit comments