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-01 14:00:47Z]: 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: 6c086fd9-6c12-4410-8987-e6a23a470100 Correlation ID: ee2e220a-d046-4742-8418-7310f01bd9b6 Timestamp: 2026-04-01 14:00:47Z - Correlation ID: ee2e220a-d046-4742-8418-7310f01bd9b6 - Trace ID: 6c086fd9-6c12-4410-8987-e6a23a470100
(node:1576) [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-01 14:00:48Z]: 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: bb388306-5a2f-4105-a196-be80f2ba0400 Correlation ID: 7a015c42-f0d8-4b95-8489-14679927bd5d Timestamp: 2026-04-01 14:00:48Z - Correlation ID: 7a015c42-f0d8-4b95-8489-14679927bd5d - Trace ID: bb388306-5a2f-4105-a196-be80f2ba0400
Error getting the secret: invalid_client: 7000222 - [2026-04-01 14:00:48Z]: 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: fb52555e-f992-4218-90b4-85e9e3f20400 Correlation ID: ea70e772-6154-4dc3-b318-ccb37be56325 Timestamp: 2026-04-01 14:00:48Z - Correlation ID: ea70e772-6154-4dc3-b318-ccb37be56325 - Trace ID: fb52555e-f992-4218-90b4-85e9e3f20400
Error getting the secret: invalid_client: 7000222 - [2026-04-01 14:00:48Z]: 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: fb52555e-f992-4218-90b4-85e9ecf20400 Correlation ID: f5c6bbf9-1595-4d65-b573-1ed1c5ba9fff Timestamp: 2026-04-01 14:00:48Z - Correlation ID: f5c6bbf9-1595-4d65-b573-1ed1c5ba9fff - Trace ID: fb52555e-f992-4218-90b4-85e9ecf20400
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)