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-05-05 18:57:48Z]: 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: c03804b5-4fca-43de-8308-3424df770200 Correlation ID: eefe0599-90ec-4172-b853-f57faf509f34 Timestamp: 2026-05-05 18:57:48Z - Correlation ID: eefe0599-90ec-4172-b853-f57faf509f34 - Trace ID: c03804b5-4fca-43de-8308-3424df770200
(node:5144) [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-05-05 18:57:49Z]: 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: 68eaf212-fda7-43b2-8be9-ac3860322d00 Correlation ID: 58c8f660-446b-4951-8222-63ff515be486 Timestamp: 2026-05-05 18:57:49Z - Correlation ID: 58c8f660-446b-4951-8222-63ff515be486 - Trace ID: 68eaf212-fda7-43b2-8be9-ac3860322d00
Error getting the secret: invalid_client: 7000222 - [2026-05-05 18:57:49Z]: 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: d8d1db7d-4314-4db9-84fc-4c8ba3a20e00 Correlation ID: 4ad8819e-2229-490a-a4a2-de34c2953e31 Timestamp: 2026-05-05 18:57:49Z - Correlation ID: 4ad8819e-2229-490a-a4a2-de34c2953e31 - Trace ID: d8d1db7d-4314-4db9-84fc-4c8ba3a20e00
Error getting the secret: invalid_client: 7000222 - [2026-05-05 18:57:49Z]: 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: 2af1ddcc-01ae-43c9-b6eb-36781b260100 Correlation ID: 562fde90-44ba-4912-8cc4-a09dccc3d7b7 Timestamp: 2026-05-05 18:57:49Z - Correlation ID: 562fde90-44ba-4912-8cc4-a09dccc3d7b7 - Trace ID: 2af1ddcc-01ae-43c9-b6eb-36781b260100
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)