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-01-04 15:53:17Z]: 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: cd9aaae7-be2c-43a5-97f4-6c348e2f1000 Correlation ID: e5a8539d-4922-4b5a-8efe-97414bc49d47 Timestamp: 2026-01-04 15:53:17Z - Correlation ID: e5a8539d-4922-4b5a-8efe-97414bc49d47 - Trace ID: cd9aaae7-be2c-43a5-97f4-6c348e2f1000
(node:2720) [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-01-04 15:53:17Z]: 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: 45b4872c-7d89-466d-9810-f2ca34b85c01 Correlation ID: 6412e3f0-d161-4720-a5e1-a22ac1778404 Timestamp: 2026-01-04 15:53:17Z - Correlation ID: 6412e3f0-d161-4720-a5e1-a22ac1778404 - Trace ID: 45b4872c-7d89-466d-9810-f2ca34b85c01
Error getting the secret: invalid_client: 7000222 - [2026-01-04 15:53:17Z]: 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: 988966d0-7daa-4d2f-b245-f5125c7cd100 Correlation ID: 519005cd-4cbe-44bd-9618-d71b3742155f Timestamp: 2026-01-04 15:53:17Z - Correlation ID: 519005cd-4cbe-44bd-9618-d71b3742155f - Trace ID: 988966d0-7daa-4d2f-b245-f5125c7cd100
Error getting the secret: invalid_client: 7000222 - [2026-01-04 15:53:17Z]: 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: ee4a7462-ec2b-462c-abd3-2a2948bc2c01 Correlation ID: 3e3a31ad-905f-4c27-91e6-4f9dcd9977f9 Timestamp: 2026-01-04 15:53:17Z - Correlation ID: 3e3a31ad-905f-4c27-91e6-4f9dcd9977f9 - Trace ID: ee4a7462-ec2b-462c-abd3-2a2948bc2c01
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)