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 20:51:12Z]: 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: 5390ed42-24d3-4b3d-bc65-5ff2b4e80b00 Correlation ID: 323286be-cfa1-48b7-b6a6-e40372283d0d Timestamp: 2026-03-28 20:51:12Z - Correlation ID: 323286be-cfa1-48b7-b6a6-e40372283d0d - Trace ID: 5390ed42-24d3-4b3d-bc65-5ff2b4e80b00
(node:5816) [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 20:51:13Z]: 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: d2d66ee8-d230-4c76-b854-c45401620900 Correlation ID: 4567986d-bfe6-41c8-aab4-fea754c09abc Timestamp: 2026-03-28 20:51:13Z - Correlation ID: 4567986d-bfe6-41c8-aab4-fea754c09abc - Trace ID: d2d66ee8-d230-4c76-b854-c45401620900
Error getting the secret: invalid_client: 7000222 - [2026-03-28 20:51:13Z]: 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: 806f7515-0510-4951-a938-69dc52fe0200 Correlation ID: f52d137b-481a-4f36-8281-8314b79ec02d Timestamp: 2026-03-28 20:51:13Z - Correlation ID: f52d137b-481a-4f36-8281-8314b79ec02d - Trace ID: 806f7515-0510-4951-a938-69dc52fe0200
Error getting the secret: invalid_client: 7000222 - [2026-03-28 20:51:13Z]: 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: acc4b9c4-91c6-4529-b6f5-437813681300 Correlation ID: 1ff0ece1-00a8-42a3-9fae-5da07937edf8 Timestamp: 2026-03-28 20:51:13Z - Correlation ID: 1ff0ece1-00a8-42a3-9fae-5da07937edf8 - Trace ID: acc4b9c4-91c6-4529-b6f5-437813681300
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)