-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400 errors cause crash #51
Comments
Yes, I think the "fix" for issue 32 has broken a few things around error handling. However, I've managed to learn gql and thereby fix my car charging problem, so many thanks for producing this great piece of code. |
Thanks for reporting and troubleshooting this. |
Hi, I've completely reinstalled my RPI so clean install and I'm hitting this problem again.
Error causes the whole of node-red to restart. |
If the gql request fails with a code 400, nothing appears in the node-red debug log. Syslog contains something like:
Node-RED[372]: 17 Aug 12:39:22 - [info] [graphql:Get Octopus] undefined
Node-RED[372]: (node:372) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'graphql' of undefined
Node-RED[372]: at /home/pi/.node-red/node_modules/node-red-contrib-graphql/graphql.js:192:36
Node-RED[372]: at runMicrotasks ()
Node-RED[372]: at processTicksAndRejections (internal/process/task_queues.js:95:5)
Modifying line 192 in graph.js as below, and details of the problem are visible in the debugging output.
BEFORE: node.msg.payload.graphql = { error };
AFTER: node.msg = { payload: error };
The text was updated successfully, but these errors were encountered: