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-03-16 23:00: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: 171dd65f-1b1d-4d20-9c0b-b1e61fc74900 Correlation ID: e01a6a30-9ad4-405a-97c9-9c31b565f93f Timestamp: 2026-03-16 23:00:03Z - Correlation ID: e01a6a30-9ad4-405a-97c9-9c31b565f93f - Trace ID: 171dd65f-1b1d-4d20-9c0b-b1e61fc74900
(node:5820) [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-03-16 23:00:04Z]: 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: 361deec4-d53e-4806-af10-ab0ac0f14800 Correlation ID: 064e5829-a307-4819-ab45-5c0e448184d4 Timestamp: 2026-03-16 23:00:04Z - Correlation ID: 064e5829-a307-4819-ab45-5c0e448184d4 - Trace ID: 361deec4-d53e-4806-af10-ab0ac0f14800
Error getting the secret: invalid_client: 7000222 - [2026-03-16 23:00:04Z]: 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: 3f11f73e-e6a4-4856-bed2-4bf5ca852800 Correlation ID: b0cd5c16-1553-4570-9e9c-df33dbf9ed69 Timestamp: 2026-03-16 23:00:04Z - Correlation ID: b0cd5c16-1553-4570-9e9c-df33dbf9ed69 - Trace ID: 3f11f73e-e6a4-4856-bed2-4bf5ca852800
Error getting the secret: invalid_client: 7000222 - [2026-03-16 23:00:04Z]: 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: 53467839-d124-49aa-a3a6-579a26ec0100 Correlation ID: 9add1efe-d8ec-4c65-9b23-ac6ed0cbb026 Timestamp: 2026-03-16 23:00:04Z - Correlation ID: 9add1efe-d8ec-4c65-9b23-ac6ed0cbb026 - Trace ID: 53467839-d124-49aa-a3a6-579a26ec0100
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)