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-23 05:52:39Z]: 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: cbe85ba2-523e-4002-b23e-0989f3cd2200 Correlation ID: 2bfbe31e-e58a-466e-a5f2-29fe6bcb7836 Timestamp: 2026-03-23 05:52:39Z - Correlation ID: 2bfbe31e-e58a-466e-a5f2-29fe6bcb7836 - Trace ID: cbe85ba2-523e-4002-b23e-0989f3cd2200
(node:3428) [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-23 05:52:39Z]: 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: ff2c9813-4d81-4fc1-adfe-9b6a73892a00 Correlation ID: 21d8a7e4-b8a4-491b-adc3-c5ac3eec222c Timestamp: 2026-03-23 05:52:39Z - Correlation ID: 21d8a7e4-b8a4-491b-adc3-c5ac3eec222c - Trace ID: ff2c9813-4d81-4fc1-adfe-9b6a73892a00
Error getting the secret: invalid_client: 7000222 - [2026-03-23 05:52:39Z]: 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: ea633948-5d46-40ce-b988-13ec2cd42100 Correlation ID: 4a79fae0-bead-4f04-bf7a-067da73987d9 Timestamp: 2026-03-23 05:52:39Z - Correlation ID: 4a79fae0-bead-4f04-bf7a-067da73987d9 - Trace ID: ea633948-5d46-40ce-b988-13ec2cd42100
Error getting the secret: invalid_client: 7000222 - [2026-03-23 05:52:39Z]: 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: 1adf54ce-138f-4fc4-b45c-2d55eaaa2600 Correlation ID: 1f321c38-855e-4623-9274-bb11dc2374fd Timestamp: 2026-03-23 05:52:39Z - Correlation ID: 1f321c38-855e-4623-9274-bb11dc2374fd - Trace ID: 1adf54ce-138f-4fc4-b45c-2d55eaaa2600
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)