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-29 23:13: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: f51aa36d-4882-4803-8d6c-e07568c11501 Correlation ID: 994cfc62-24ba-4384-9910-e88734a3f6d9 Timestamp: 2025-12-29 23:13:22Z - Correlation ID: 994cfc62-24ba-4384-9910-e88734a3f6d9 - Trace ID: f51aa36d-4882-4803-8d6c-e07568c11501
(node:696) [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-29 23:13: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: 34b9efad-a182-4776-b3fa-ecd228c4b300 Correlation ID: 75c1bbe0-8d5a-4e37-abaf-941018676cd5 Timestamp: 2025-12-29 23:13:22Z - Correlation ID: 75c1bbe0-8d5a-4e37-abaf-941018676cd5 - Trace ID: 34b9efad-a182-4776-b3fa-ecd228c4b300
Error getting the secret: invalid_client: 7000222 - [2025-12-29 23:13: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: 4cf8cfb9-d85c-477e-879b-21ea6b4dce00 Correlation ID: d269adb6-e241-4e5a-a20a-95f45e986bc8 Timestamp: 2025-12-29 23:13:22Z - Correlation ID: d269adb6-e241-4e5a-a20a-95f45e986bc8 - Trace ID: 4cf8cfb9-d85c-477e-879b-21ea6b4dce00
Error getting the secret: invalid_client: 7000222 - [2025-12-29 23:13: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: b3151b35-923a-448c-82a8-9f6a8ec70f00 Correlation ID: 60475216-4621-477a-a24c-c57c782b71ae Timestamp: 2025-12-29 23:13:23Z - Correlation ID: 60475216-4621-477a-a24c-c57c782b71ae - Trace ID: b3151b35-923a-448c-82a8-9f6a8ec70f00
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)