You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when an API schema indicates that it has parameters, but they are not supplied within the x-example (e.g. x-example.parameter is missing, or has less elements than the schema's parameter array), the following error is displayed:
(node:3396) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'script' of undefined
at getParamValue (/project/node_modules/oaat/src/utils.js:271:16)
at /project/node_modules/oaat/src/utils.js:241:32
at Array.map (<anonymous>)
at resolveFetchConfigParams (/projectnode_modules/oaat/src/utils.js:238:44)
at /project/node_modules/oaat/src/utils.js:208:41
at Readable.<anonymous> (/project/node_modules/oaat/src/utils.js:49:25)
at Readable.emit (events.js:310:20)
at addChunk (_stream_readable.js:286:12)
at readableAddChunk (_stream_readable.js:268:9)
at Readable.push (_stream_readable.js:209:10)
(node:3396) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async functionwithout a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
Additionally, the program does not exit with a non-zero exit code.
Suggested Fix
Show a nice error message indicating:
which example is incorrectly configured
Exit with a non-zero exit code
The text was updated successfully, but these errors were encountered:
Currently when an API schema indicates that it has parameters, but they are not supplied within the
x-example
(e.g.x-example.parameter
is missing, or has less elements than the schema's parameter array), the following error is displayed:Additionally, the program does not exit with a non-zero exit code.
Suggested Fix
The text was updated successfully, but these errors were encountered: