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-23 02:38:07Z]: 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: ea50887e-892b-49f8-9c02-0ce8348b3c00 Correlation ID: 9350fcf1-e42a-473e-8fb8-6ad61d54e7dd Timestamp: 2026-03-23 02:38:07Z - Correlation ID: 9350fcf1-e42a-473e-8fb8-6ad61d54e7dd - Trace ID: ea50887e-892b-49f8-9c02-0ce8348b3c00
(node:4980) [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-23 02:38:07Z]: 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: a146c387-ae81-4fe5-b6f7-3c0c77111d00 Correlation ID: 92d9a39b-af57-4470-8694-1a384815eb36 Timestamp: 2026-03-23 02:38:07Z - Correlation ID: 92d9a39b-af57-4470-8694-1a384815eb36 - Trace ID: a146c387-ae81-4fe5-b6f7-3c0c77111d00
Error getting the secret: invalid_client: 7000222 - [2026-03-23 02:38:07Z]: 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: 14942c59-376e-4de1-b1bb-96ab65733900 Correlation ID: 06de70b5-41b6-4281-a0e5-03297101a9c9 Timestamp: 2026-03-23 02:38:07Z - Correlation ID: 06de70b5-41b6-4281-a0e5-03297101a9c9 - Trace ID: 14942c59-376e-4de1-b1bb-96ab65733900
Error getting the secret: invalid_client: 7000222 - [2026-03-23 02:38:08Z]: 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: a869e5ac-3139-4c03-82c9-b369c0e31f00 Correlation ID: 64681e2c-e700-45c1-9b50-817291922dd6 Timestamp: 2026-03-23 02:38:08Z - Correlation ID: 64681e2c-e700-45c1-9b50-817291922dd6 - Trace ID: a869e5ac-3139-4c03-82c9-b369c0e31f00
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)