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-28 08:01:31Z]: 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: e3e75671-4d1a-4ece-b921-9065892f0100 Correlation ID: 665d4712-44d8-4ca3-9b80-43a7f9bbf6ce Timestamp: 2026-03-28 08:01:31Z - Correlation ID: 665d4712-44d8-4ca3-9b80-43a7f9bbf6ce - Trace ID: e3e75671-4d1a-4ece-b921-9065892f0100
(node:4468) [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-28 08:01:31Z]: 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: 81efbc32-e180-4974-9436-a81957250100 Correlation ID: bda1e8c2-b113-479a-916a-92d5b7938e5f Timestamp: 2026-03-28 08:01:31Z - Correlation ID: bda1e8c2-b113-479a-916a-92d5b7938e5f - Trace ID: 81efbc32-e180-4974-9436-a81957250100
Error getting the secret: invalid_client: 7000222 - [2026-03-28 08:01:32Z]: 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: ba7bcad4-a9bb-4066-b97b-501f180c0100 Correlation ID: 89d8c7ea-956b-4c70-829d-ccff4f54d1ef Timestamp: 2026-03-28 08:01:32Z - Correlation ID: 89d8c7ea-956b-4c70-829d-ccff4f54d1ef - Trace ID: ba7bcad4-a9bb-4066-b97b-501f180c0100
Error getting the secret: invalid_client: 7000222 - [2026-03-28 08:01:32Z]: 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: f9875f6c-b067-485a-a395-b6a0627a0100 Correlation ID: b4178f1c-fdc7-444a-a302-8700d10775fe Timestamp: 2026-03-28 08:01:32Z - Correlation ID: b4178f1c-fdc7-444a-a302-8700d10775fe - Trace ID: f9875f6c-b067-485a-a395-b6a0627a0100
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)