KevinBonnoron / node-red-contrib-freebox

4 stars 4 forks source link

Can't make API requests #11

Closed ybizeul closed 1 year ago

ybizeul commented 3 years ago
24 Mar 17:34:35 - [info] GET /connection/ftth/
(node:17) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'method' of undefined
    at /data/node_modules/node-red-contrib-freebox/src/nodes/freebox-server/freebox-server.js:248:44
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without 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: 176)

Seems like method should be determined by the presence of data, not sure why it's undefined here

ybizeul commented 3 years ago

That's weird, all of a sudden the API calls succeeds... Leaving this open for visibility

KevinBonnoron commented 3 years ago

Are you using the latest version from nodered or from github ? That should not happend as method is determined either by "msg.method" or (if not defined) "msg.payload".

ybizeul commented 3 years ago

I'm using the one from node-red palette