@trojs/openapi-server 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@trojs/openapi-server",
3
3
  "description": "OpenAPI Server",
4
- "version": "1.15.0",
4
+ "version": "1.16.0",
5
5
  "author": {
6
6
  "name": "Pieter Wigboldus",
7
7
  "url": "https://trojs.org/"
@@ -11,6 +11,10 @@ const errorCodesStatus = [
11
11
  type: RangeError,
12
12
  status: 404
13
13
  },
14
+ {
15
+ type: SyntaxError,
16
+ status: 400
17
+ },
14
18
  {
15
19
  type: Error,
16
20
  status: 500
@@ -99,6 +99,7 @@ export const makeExpressCallback
99
99
  }
100
100
 
101
101
  return {
102
+ errors: error.errors || error.value?.errors,
102
103
  status: errorCodeStatus,
103
104
  timestamp: new Date(),
104
105
  message: error.message
@@ -1 +1 @@
1
- {"version":3,"file":"error-status.d.ts","sourceRoot":"","sources":["../src/error-status.js"],"names":[],"mappings":"AAyBe,iCAHJ,WAAW,GACT,MAAM,CAKX;;0BA3BK,KAAK,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE"}
1
+ {"version":3,"file":"error-status.d.ts","sourceRoot":"","sources":["../src/error-status.js"],"names":[],"mappings":"AA6Be,iCAHJ,WAAW,GACT,MAAM,CAKX;;0BA/BK,KAAK,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"express-callback.d.ts","sourceRoot":"","sources":["../src/express-callback.js"],"names":[],"mappings":"AAwBO,sHAVJ;IAAyB,UAAU;IACZ,aAAa,EAA5B,MAAM;IACW,YAAY,GAA7B,OAAO,YAAC;IACQ,MAAM,GAAtB,MAAM,YAAC;IACS,IAAI,GAApB,MAAM,YAAC;IACU,IAAI,GAArB,OAAO,YAAC;IACU,MAAM,GAAxB,oBAAS;IACS,OAAO,GAAzB,oBAAS;CACjB,YAoFE;sBArGQ,OAAO,2BAA2B,EAAE,OAAO;uBAC3C,OAAO,2BAA2B,EAAE,QAAQ;sBAC5C,OAAO,iBAAiB,EAAE,OAAO;qBACjC,OAAO,UAAU,EAAE,MAAM"}
1
+ {"version":3,"file":"express-callback.d.ts","sourceRoot":"","sources":["../src/express-callback.js"],"names":[],"mappings":"AAwBO,sHAVJ;IAAyB,UAAU;IACZ,aAAa,EAA5B,MAAM;IACW,YAAY,GAA7B,OAAO,YAAC;IACQ,MAAM,GAAtB,MAAM,YAAC;IACS,IAAI,GAApB,MAAM,YAAC;IACU,IAAI,GAArB,OAAO,YAAC;IACU,MAAM,GAAxB,oBAAS;IACS,OAAO,GAAzB,oBAAS;CACjB,YAqFE;sBAtGQ,OAAO,2BAA2B,EAAE,OAAO;uBAC3C,OAAO,2BAA2B,EAAE,QAAQ;sBAC5C,OAAO,iBAAiB,EAAE,OAAO;qBACjC,OAAO,UAAU,EAAE,MAAM"}