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-24 03:25:28Z]: 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: a7e81739-8b2d-40c4-a3cd-6c76b2e17900 Correlation ID: a78340c8-f344-4c04-bcde-8423e0e1710e Timestamp: 2026-04-24 03:25:28Z - Correlation ID: a78340c8-f344-4c04-bcde-8423e0e1710e - Trace ID: a7e81739-8b2d-40c4-a3cd-6c76b2e17900
(node:2368) [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-24 03:25:29Z]: 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: f8c7472a-05bb-49f0-9fec-3a3da92f7b00 Correlation ID: 3a98741b-60cb-430e-9161-695a68d1e849 Timestamp: 2026-04-24 03:25:29Z - Correlation ID: 3a98741b-60cb-430e-9161-695a68d1e849 - Trace ID: f8c7472a-05bb-49f0-9fec-3a3da92f7b00
Error getting the secret: invalid_client: 7000222 - [2026-04-24 03:25:29Z]: 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: 3671b765-009e-4f4b-b7cb-efb0f1dc0b00 Correlation ID: 61fd978f-4d65-48ab-8fbd-b6479ddccb63 Timestamp: 2026-04-24 03:25:29Z - Correlation ID: 61fd978f-4d65-48ab-8fbd-b6479ddccb63 - Trace ID: 3671b765-009e-4f4b-b7cb-efb0f1dc0b00
Error getting the secret: invalid_client: 7000222 - [2026-04-24 03:25:29Z]: 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: 3671b765-009e-4f4b-b7cb-efb0f9dc0b00 Correlation ID: 98acf155-653d-4690-9ac0-71a80b9cd49c Timestamp: 2026-04-24 03:25:29Z - Correlation ID: 98acf155-653d-4690-9ac0-71a80b9cd49c - Trace ID: 3671b765-009e-4f4b-b7cb-efb0f9dc0b00
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)