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
... terminates node.js process due to unhandled error. Stated that statusCode is undefined.
(node:28884) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property 'statusCode' of 'response' as it is undefined. at Object.exports.isResponseOk (C:\Users\OneandOnly\Desktop\Sensor\node_modules\got\dist\source\core\utils\is-response-ok.js:5:13) at Request.<anonymous> (C:\Users\OneandOnly\Desktop\Sensor\node_modules\got\dist\source\as-promise\index.js:116:39) at processTicksAndRejections (internal/process/task_queues.js:97:5)
Expected behavior
... returns promise statusCode as 200 if the site is live.
You should not use setTimeout. This will cause an unhandled rejection when the write call fails. Use delay or something similar, make afterResponse an async function, and promisify the fs call.
You should not use setTimeout. This will cause an unhandled rejection when the write call fails. Use delay or something similar, make afterResponse an async function, and promisify the fs call.
thanks for the advice. was trying stuff out to see what would happen.
Describe the bug
Actual behavior
... terminates node.js process due to unhandled error. Stated that statusCode is undefined.
(node:28884) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property 'statusCode' of 'response' as it is undefined. at Object.exports.isResponseOk (C:\Users\OneandOnly\Desktop\Sensor\node_modules\got\dist\source\core\utils\is-response-ok.js:5:13) at Request.<anonymous> (C:\Users\OneandOnly\Desktop\Sensor\node_modules\got\dist\source\as-promise\index.js:116:39) at processTicksAndRejections (internal/process/task_queues.js:97:5)
Expected behavior
... returns promise statusCode as 200 if the site is live.
Code to reproduce
Checklist
The text was updated successfully, but these errors were encountered: