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-04-30 18:08:29Z]: 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: 0404e504-c23f-497b-866b-77e9ffae0900 Correlation ID: 48a9af29-8bf6-45f9-8696-968845054cb5 Timestamp: 2026-04-30 18:08:29Z - Correlation ID: 48a9af29-8bf6-45f9-8696-968845054cb5 - Trace ID: 0404e504-c23f-497b-866b-77e9ffae0900
(node:5952) [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-04-30 18:08:29Z]: 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: 1c13cbf6-cc58-4aa8-b88e-189ed2220d00 Correlation ID: 5850beeb-6f5e-4d97-8869-2d933bee58a0 Timestamp: 2026-04-30 18:08:29Z - Correlation ID: 5850beeb-6f5e-4d97-8869-2d933bee58a0 - Trace ID: 1c13cbf6-cc58-4aa8-b88e-189ed2220d00
Error getting the secret: invalid_client: 7000222 - [2026-04-30 18:08:29Z]: 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: 31307d6b-4dd5-4bd5-8f6a-bde42f1d0c00 Correlation ID: 44e986c1-ab81-467f-957c-75930e7245b5 Timestamp: 2026-04-30 18:08:29Z - Correlation ID: 44e986c1-ab81-467f-957c-75930e7245b5 - Trace ID: 31307d6b-4dd5-4bd5-8f6a-bde42f1d0c00
Error getting the secret: invalid_client: 7000222 - [2026-04-30 18:08:29Z]: 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: 90b84193-04a1-4ec0-a803-c472fb9c0e00 Correlation ID: 18eb8b5b-b4db-4360-a5ab-c97b4da6234d Timestamp: 2026-04-30 18:08:29Z - Correlation ID: 18eb8b5b-b4db-4360-a5ab-c97b4da6234d - Trace ID: 90b84193-04a1-4ec0-a803-c472fb9c0e00
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)