@aircall/exception-zod
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -21,3 +21,6 @@ 'use strict'; | ||
inputException.addIssue( | ||
new exception.InvalidTypeException({ path, received: issue.received, expected: issue.expected }) | ||
new exception.InvalidTypeException( | ||
{ path, received: issue.received, expected: issue.expected }, | ||
issue.message | ||
) | ||
); | ||
@@ -27,11 +30,29 @@ break; | ||
inputException.addIssue( | ||
new exception.InvalidStringException({ | ||
path, | ||
validation: issue.validation | ||
}) | ||
new exception.InvalidStringException( | ||
{ | ||
path, | ||
validation: issue.validation | ||
}, | ||
issue.message | ||
) | ||
); | ||
break; | ||
case "invalid_enum_value": | ||
inputException.addIssue( | ||
new exception.InvalidEnumException( | ||
{ | ||
path, | ||
received: issue.received.toString(), | ||
options: issue.options.map((option) => option.toString()) | ||
}, | ||
issue.message | ||
) | ||
); | ||
break; | ||
case "too_small": | ||
inputException.addIssue( | ||
new exception.TooSmallException({ path, type: issue.type, minimum: issue.minimum }) | ||
new exception.TooSmallException( | ||
{ path, type: issue.type, minimum: issue.minimum }, | ||
issue.message | ||
) | ||
); | ||
@@ -41,3 +62,6 @@ break; | ||
inputException.addIssue( | ||
new exception.TooBigException({ path, type: issue.type, maximum: issue.maximum }) | ||
new exception.TooBigException( | ||
{ path, type: issue.type, maximum: issue.maximum }, | ||
issue.message | ||
) | ||
); | ||
@@ -44,0 +68,0 @@ break; |
{ | ||
"name": "@aircall/exception-zod", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"main": "dist/index.js", | ||
@@ -32,3 +32,3 @@ "module": "dist/index.mjs", | ||
"devDependencies": { | ||
"@aircall/exception": "0.1.0", | ||
"@aircall/exception": "0.1.1", | ||
"@aircall/exception-gql": "0.1.1", | ||
@@ -35,0 +35,0 @@ "@aircall/exception-rest": "0.1.1", |
@@ -8,3 +8,3 @@ # Introduction | ||
```bash | ||
npm install @aircall/exception-zod | ||
yarn add @aircall/exception-zod | ||
``` | ||
@@ -11,0 +11,0 @@ |
Sorry, the diff of this file is not supported yet
12216
141