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-08-12 09:43:56Z]: 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: 3cb4d8ed-96c2-4014-b712-fc694a6a1b00 Correlation ID: bc937da5-e4b1-4d37-a8f1-c5285677bc22 Timestamp: 2026-08-12 09:43:56Z - Correlation ID: bc937da5-e4b1-4d37-a8f1-c5285677bc22 - Trace ID: 3cb4d8ed-96c2-4014-b712-fc694a6a1b00
(node:3512) [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-08-12 09:43:56Z]: 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: ed4ff9e4-d1b1-41bb-a057-6f5c58a93000 Correlation ID: 716b2eb2-4e8c-4f79-95cf-c67d61740bc4 Timestamp: 2026-08-12 09:43:56Z - Correlation ID: 716b2eb2-4e8c-4f79-95cf-c67d61740bc4 - Trace ID: ed4ff9e4-d1b1-41bb-a057-6f5c58a93000
Error getting the secret: invalid_client: 7000222 - [2026-08-12 09:43:56Z]: 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: 51e0c918-d25c-4e31-ba3a-11995b161900 Correlation ID: 7a63e3af-a5e5-4ce4-bc1a-6d03be1298a2 Timestamp: 2026-08-12 09:43:56Z - Correlation ID: 7a63e3af-a5e5-4ce4-bc1a-6d03be1298a2 - Trace ID: 51e0c918-d25c-4e31-ba3a-11995b161900
Error getting the secret: invalid_client: 7000222 - [2026-08-12 09:43:57Z]: 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: f0d067e9-1505-441a-a2ac-f4a6ea143200 Correlation ID: 60c303f7-f7d1-4a58-a258-97c48d8d186f Timestamp: 2026-08-12 09:43:57Z - Correlation ID: 60c303f7-f7d1-4a58-a258-97c48d8d186f - Trace ID: f0d067e9-1505-441a-a2ac-f4a6ea143200
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)