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-24 15:10: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: df352505-361f-47e7-bc34-49f8177a4b00 Correlation ID: 42dba928-57dd-45ed-9198-295560529869 Timestamp: 2026-03-24 15:10:04Z - Correlation ID: 42dba928-57dd-45ed-9198-295560529869 - Trace ID: df352505-361f-47e7-bc34-49f8177a4b00
(node:5036) [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-24 15:10:05Z]: 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: b7b1541b-e5a9-4c78-a541-42dfbc124400 Correlation ID: 2cea2359-125c-4a77-affa-a076b79b81eb Timestamp: 2026-03-24 15:10:05Z - Correlation ID: 2cea2359-125c-4a77-affa-a076b79b81eb - Trace ID: b7b1541b-e5a9-4c78-a541-42dfbc124400
Error getting the secret: invalid_client: 7000222 - [2026-03-24 15:10:05Z]: 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: 75c3e94f-5480-46e7-a0f9-f75f05d74c00 Correlation ID: b04d9f62-0ce7-4521-a6d4-4ef38b97b65c Timestamp: 2026-03-24 15:10:05Z - Correlation ID: b04d9f62-0ce7-4521-a6d4-4ef38b97b65c - Trace ID: 75c3e94f-5480-46e7-a0f9-f75f05d74c00
Error getting the secret: invalid_client: 7000222 - [2026-03-24 15:10:05Z]: 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: 2fb3f65e-57c2-45d9-9f2c-72dc71e84400 Correlation ID: c2552e1e-c6c2-4d40-86dc-6967e5a629de Timestamp: 2026-03-24 15:10:05Z - Correlation ID: c2552e1e-c6c2-4d40-86dc-6967e5a629de - Trace ID: 2fb3f65e-57c2-45d9-9f2c-72dc71e84400
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)