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-06 14:05:22Z]: 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: 36ce6cb9-503a-4956-9f06-a2e449e87700 Correlation ID: 1679189b-6978-4b43-aa37-711d868096a1 Timestamp: 2026-03-06 14:05:22Z - Correlation ID: 1679189b-6978-4b43-aa37-711d868096a1 - Trace ID: 36ce6cb9-503a-4956-9f06-a2e449e87700
(node:5000) [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-06 14:05:23Z]: 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: 831c388f-7c16-438b-a30b-28d977911a00 Correlation ID: 602f738c-4e76-4bc5-8d16-71a847ff023d Timestamp: 2026-03-06 14:05:23Z - Correlation ID: 602f738c-4e76-4bc5-8d16-71a847ff023d - Trace ID: 831c388f-7c16-438b-a30b-28d977911a00
Error getting the secret: invalid_client: 7000222 - [2026-03-06 14:05:23Z]: 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: f05d3e5b-c50d-4123-9b3a-f88104fe0000 Correlation ID: 87febc01-8b1c-4834-b5eb-9cd204e652b6 Timestamp: 2026-03-06 14:05:23Z - Correlation ID: 87febc01-8b1c-4834-b5eb-9cd204e652b6 - Trace ID: f05d3e5b-c50d-4123-9b3a-f88104fe0000
Error getting the secret: invalid_client: 7000222 - [2026-03-06 14:05:23Z]: 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: 1bd8e873-9381-4ad6-863c-83191057eb00 Correlation ID: 9fe08243-ab10-48e9-9c24-0319d38af0ce Timestamp: 2026-03-06 14:05:23Z - Correlation ID: 9fe08243-ab10-48e9-9c24-0319d38af0ce - Trace ID: 1bd8e873-9381-4ad6-863c-83191057eb00
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)