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-04-29 02:11:40Z]: 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: 687ec8bd-2cd6-43a6-bf76-874200047800 Correlation ID: f31d202e-8b7d-407f-a376-841e7c6584ed Timestamp: 2026-04-29 02:11:40Z - Correlation ID: f31d202e-8b7d-407f-a376-841e7c6584ed - Trace ID: 687ec8bd-2cd6-43a6-bf76-874200047800
(node:5540) [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-04-29 02:11:40Z]: 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: 9474f039-6e57-44d7-9abc-911879076a00 Correlation ID: 8985b0d6-8dc7-4b44-a823-c671a9f2f037 Timestamp: 2026-04-29 02:11:40Z - Correlation ID: 8985b0d6-8dc7-4b44-a823-c671a9f2f037 - Trace ID: 9474f039-6e57-44d7-9abc-911879076a00
Error getting the secret: invalid_client: 7000222 - [2026-04-29 02:11:40Z]: 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: 630f0a44-988d-43b9-a341-9471bd880b00 Correlation ID: 9bebaab4-faf7-497a-8471-05d33438bf36 Timestamp: 2026-04-29 02:11:40Z - Correlation ID: 9bebaab4-faf7-497a-8471-05d33438bf36 - Trace ID: 630f0a44-988d-43b9-a341-9471bd880b00
Error getting the secret: invalid_client: 7000222 - [2026-04-29 02:11:40Z]: 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: 9ae18083-05f0-4b87-b49a-7262b6c70700 Correlation ID: fb8c96a5-c093-4035-8628-edfe5e216d6c Timestamp: 2026-04-29 02:11:40Z - Correlation ID: fb8c96a5-c093-4035-8628-edfe5e216d6c - Trace ID: 9ae18083-05f0-4b87-b49a-7262b6c70700
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)