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-21 07:26:37Z]: 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: cb3f9bc2-7f57-4247-bcdd-d04033360400 Correlation ID: 90b245a0-eedd-4f98-914f-3e89aef9a0c3 Timestamp: 2026-03-21 07:26:37Z - Correlation ID: 90b245a0-eedd-4f98-914f-3e89aef9a0c3 - Trace ID: cb3f9bc2-7f57-4247-bcdd-d04033360400
(node:3612) [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-21 07:26:38Z]: 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: 4106b0c4-bafb-4d80-a279-8b66f06d0500 Correlation ID: b54d4403-edbc-4410-8e0d-550fe13a10e7 Timestamp: 2026-03-21 07:26:38Z - Correlation ID: b54d4403-edbc-4410-8e0d-550fe13a10e7 - Trace ID: 4106b0c4-bafb-4d80-a279-8b66f06d0500
Error getting the secret: invalid_client: 7000222 - [2026-03-21 07:26:38Z]: 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: 9dc64f9f-042a-432e-8de9-517f6df40500 Correlation ID: 976b3b91-e422-4bba-b5ba-d99a166d3142 Timestamp: 2026-03-21 07:26:38Z - Correlation ID: 976b3b91-e422-4bba-b5ba-d99a166d3142 - Trace ID: 9dc64f9f-042a-432e-8de9-517f6df40500
Error getting the secret: invalid_client: 7000222 - [2026-03-21 07:26:39Z]: 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: 2a5cbe02-ca82-40b3-ab81-2cbbe1e60300 Correlation ID: bd008b38-f4d1-4626-a5b8-15c4eaddc56e Timestamp: 2026-03-21 07:26:39Z - Correlation ID: bd008b38-f4d1-4626-a5b8-15c4eaddc56e - Trace ID: 2a5cbe02-ca82-40b3-ab81-2cbbe1e60300
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)