iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
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:

Error getting the secret: invalid_client: 7000222 - [2026-03-28 04:50:32Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 31079ca6-3d19-489e-b620-a05afe210100 Correlation ID: ec61980f-d4a9-4ee4-9df2-85c7ce45bd82 Timestamp: 2026-03-28 04:50:32Z - Correlation ID: ec61980f-d4a9-4ee4-9df2-85c7ce45bd82 - Trace ID: 31079ca6-3d19-489e-b620-a05afe210100
(node:4432) [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)
Error getting the secret: invalid_client: 7000222 - [2026-03-28 04:50:32Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 123a7f56-d3ec-4f91-b869-d9271d7f0000 Correlation ID: 269b8fb1-257c-4f17-95c3-6ea91bf9686b Timestamp: 2026-03-28 04:50:32Z - Correlation ID: 269b8fb1-257c-4f17-95c3-6ea91bf9686b - Trace ID: 123a7f56-d3ec-4f91-b869-d9271d7f0000
Error getting the secret: invalid_client: 7000222 - [2026-03-28 04:50:32Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: cebb14fe-a130-4cc6-a1d0-dbfcaeba4100 Correlation ID: 018e1ef0-4790-4e9c-a091-b1bc578ee067 Timestamp: 2026-03-28 04:50:32Z - Correlation ID: 018e1ef0-4790-4e9c-a091-b1bc578ee067 - Trace ID: cebb14fe-a130-4cc6-a1d0-dbfcaeba4100
Error getting the secret: invalid_client: 7000222 - [2026-03-28 04:50:32Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 87ee3da1-4406-4204-a0ad-95e231f63800 Correlation ID: 0a7ad4f5-fcc7-4422-a297-77154d059198 Timestamp: 2026-03-28 04:50:32Z - Correlation ID: 0a7ad4f5-fcc7-4422-a297-77154d059198 - Trace ID: 87ee3da1-4406-4204-a0ad-95e231f63800
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'cosdb')
    at C:\stop_order_dev\server.js:25:30
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)