Using any script in Apiroom that contains Rule caller restroom-mw, for example
Rule caller restroom-mw
Scenario 'ecdh': Create the key
Given nothing
When I create the ecdh key
Then print the 'keyring'
and add some data as input that is not in json format, for example
Apiroom will crash showing a grey screen.
Testing it from restroom API, without Apiroom, it returns the following message:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected token W in JSON at position 27<br> at JSON.parse (<anonymous>)<br> at parse (/home/matteo/src/db_restroom/node_modules/body-parser/lib/types/json.js:89:19)<br> at /home/matteo/src/db_restroom/node_modules/body-parser/lib/read.js:128:18<br> at AsyncResource.runInAsyncScope (node:async_hooks:203:9)<br> at invokeCallback (/home/matteo/src/db_restroom/node_modules/raw-body/index.js:231:16)<br> at done (/home/matteo/src/db_restroom/node_modules/raw-body/index.js:220:7)<br> at IncomingMessage.onEnd (/home/matteo/src/db_restroom/node_modules/raw-body/index.js:280:7)<br> at IncomingMessage.emit (node:events:525:35)<br> at endReadableNT (node:internal/streams/readable:1358:12)<br> at processTicksAndRejections (node:internal/process/task_queues:83:21)</pre>
</body>
</html>
Using any script in Apiroom that contains
Rule caller restroom-mw, for exampleand add some data as input that is not in json format, for example
Apiroom will crash showing a grey screen.
Testing it from restroom API, without Apiroom, it returns the following message: