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-28 09:57:55Z]: 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: 7243496e-0b75-42b3-9f93-7b4b05b00000 Correlation ID: b67c30d5-ed85-4569-96c7-8afcc987a21b Timestamp: 2026-04-28 09:57:55Z - Correlation ID: b67c30d5-ed85-4569-96c7-8afcc987a21b - Trace ID: 7243496e-0b75-42b3-9f93-7b4b05b00000
(node:3792) [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-28 09:57:55Z]: 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: ded901f2-28e9-4274-a5f4-cf52915b6000 Correlation ID: fbd3a221-6d38-4b11-a56d-47e5b73391e9 Timestamp: 2026-04-28 09:57:55Z - Correlation ID: fbd3a221-6d38-4b11-a56d-47e5b73391e9 - Trace ID: ded901f2-28e9-4274-a5f4-cf52915b6000
Error getting the secret: invalid_client: 7000222 - [2026-04-28 09:57:55Z]: 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: 9e271c13-ba83-49a0-8bc1-f28191de5600 Correlation ID: c5890999-38ed-491f-892e-757a25563489 Timestamp: 2026-04-28 09:57:55Z - Correlation ID: c5890999-38ed-491f-892e-757a25563489 - Trace ID: 9e271c13-ba83-49a0-8bc1-f28191de5600
Error getting the secret: invalid_client: 7000222 - [2026-04-28 09:57:55Z]: 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: 7243496e-0b75-42b3-9f93-7b4b0cb00000 Correlation ID: 2d3841ac-2f9d-4f7c-9e40-d260129aa9c8 Timestamp: 2026-04-28 09:57:55Z - Correlation ID: 2d3841ac-2f9d-4f7c-9e40-d260129aa9c8 - Trace ID: 7243496e-0b75-42b3-9f93-7b4b0cb00000
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)