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-02-05 16:36:41Z]: 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: 227eb72b-17a1-4cd2-83c1-6170d9210400 Correlation ID: 19e969cf-7791-4c8b-84d6-1c386ccd67fd Timestamp: 2026-02-05 16:36:41Z - Correlation ID: 19e969cf-7791-4c8b-84d6-1c386ccd67fd - Trace ID: 227eb72b-17a1-4cd2-83c1-6170d9210400
(node:5192) [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-02-05 16:36:42Z]: 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: 79e580fe-a20c-46da-884a-41dcb92d0600 Correlation ID: bb745f5a-477b-4568-8235-c5b1d7f4bd2a Timestamp: 2026-02-05 16:36:42Z - Correlation ID: bb745f5a-477b-4568-8235-c5b1d7f4bd2a - Trace ID: 79e580fe-a20c-46da-884a-41dcb92d0600
Error getting the secret: invalid_client: 7000222 - [2026-02-05 16:36:42Z]: 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: b7c72ee9-9cdf-4bf9-aa0c-9beb51ab0000 Correlation ID: bdf5c192-6277-4e75-95c5-dee59bdac5e5 Timestamp: 2026-02-05 16:36:42Z - Correlation ID: bdf5c192-6277-4e75-95c5-dee59bdac5e5 - Trace ID: b7c72ee9-9cdf-4bf9-aa0c-9beb51ab0000
Error getting the secret: invalid_client: 7000222 - [2026-02-05 16:36:42Z]: 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: b7c72ee9-9cdf-4bf9-aa0c-9beb56ab0000 Correlation ID: b23128d5-991f-431a-8f89-f7adc146c4c1 Timestamp: 2026-02-05 16:36:42Z - Correlation ID: b23128d5-991f-431a-8f89-f7adc146c4c1 - Trace ID: b7c72ee9-9cdf-4bf9-aa0c-9beb56ab0000
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)