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 - [2025-12-28 18:55:58Z]: 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: e56633a3-3712-4976-9578-72a78dfab500 Correlation ID: f577c569-0cc1-4912-a2a0-9332558083c9 Timestamp: 2025-12-28 18:55:58Z - Correlation ID: f577c569-0cc1-4912-a2a0-9332558083c9 - Trace ID: e56633a3-3712-4976-9578-72a78dfab500
(node:1988) [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 - [2025-12-28 18:55:59Z]: 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: 49dcc112-1d8f-4716-85b1-819b66d28000 Correlation ID: f47296f1-07c0-493f-93d4-f54045545228 Timestamp: 2025-12-28 18:55:59Z - Correlation ID: f47296f1-07c0-493f-93d4-f54045545228 - Trace ID: 49dcc112-1d8f-4716-85b1-819b66d28000
Error getting the secret: invalid_client: 7000222 - [2025-12-28 18:55:59Z]: 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: 252995a6-9c7b-4184-8abd-798672f9c200 Correlation ID: f7066fd5-6a6a-473b-96bd-1798225310a3 Timestamp: 2025-12-28 18:55:59Z - Correlation ID: f7066fd5-6a6a-473b-96bd-1798225310a3 - Trace ID: 252995a6-9c7b-4184-8abd-798672f9c200
Error getting the secret: invalid_client: 7000222 - [2025-12-28 18:55:59Z]: 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: 22f81920-7226-431b-bc85-559b0fe4bc00 Correlation ID: 0322ace2-5b33-4b68-83ee-39e828e2e178 Timestamp: 2025-12-28 18:55:59Z - Correlation ID: 0322ace2-5b33-4b68-83ee-39e828e2e178 - Trace ID: 22f81920-7226-431b-bc85-559b0fe4bc00
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)