iisnode encountered an error when processing the request.

HTTP status: 500
HTTP subStatus: 1013
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

(node:3296) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:3296) [DEP0126] DeprecationWarning: timers.active() is deprecated. Please use timeout.refresh() instead.
(node:3296) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.
(node:3296) [DEP0095] DeprecationWarning: timers.enroll() is deprecated. Please use setTimeout instead.
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'id')
    at getPageContent (C:\Inetpub\vhosts\evanslee.co.uk\httpdocs\server.js:342:149)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)