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-10-24 03:34:02Z]: 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: 4a3714dc-a1f1-47f7-8e02-e3c348e52f00 Correlation ID: b183249d-cc4a-4d92-a7a0-6f4f46d57963 Timestamp: 2025-10-24 03:34:02Z - Correlation ID: b183249d-cc4a-4d92-a7a0-6f4f46d57963 - Trace ID: 4a3714dc-a1f1-47f7-8e02-e3c348e52f00
(node:4820) [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-10-24 03:34:02Z]: 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: 88387fd0-82de-4246-995a-92a4b5103400 Correlation ID: 5ff2017c-3591-4cd2-ad98-96f44cc57450 Timestamp: 2025-10-24 03:34:02Z - Correlation ID: 5ff2017c-3591-4cd2-ad98-96f44cc57450 - Trace ID: 88387fd0-82de-4246-995a-92a4b5103400
Error getting the secret: invalid_client: 7000222 - [2025-10-24 03:34:02Z]: 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: 86447088-741d-448d-a736-5ad913e70300 Correlation ID: b136ebe3-5f95-4f9b-82c6-81d206ba01b6 Timestamp: 2025-10-24 03:34:02Z - Correlation ID: b136ebe3-5f95-4f9b-82c6-81d206ba01b6 - Trace ID: 86447088-741d-448d-a736-5ad913e70300
Error getting the secret: invalid_client: 7000222 - [2025-10-24 03:34:03Z]: 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: 06b77cfa-8c3b-41f5-beec-da0922d63800 Correlation ID: 53f9fdab-fecf-47dd-9c0e-44b147d846fd Timestamp: 2025-10-24 03:34:03Z - Correlation ID: 53f9fdab-fecf-47dd-9c0e-44b147d846fd - Trace ID: 06b77cfa-8c3b-41f5-beec-da0922d63800
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)