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-01 21:17: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: 40a68404-69b0-4fe8-a068-fe6becc95200 Correlation ID: 8647063e-ab70-48e3-b1a9-4db1f04f79b8 Timestamp: 2026-03-01 21:17:48Z - Correlation ID: 8647063e-ab70-48e3-b1a9-4db1f04f79b8 - Trace ID: 40a68404-69b0-4fe8-a068-fe6becc95200
(node:5464) [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-01 21:17:49Z]: 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: 0e36510a-7b8d-486b-a9d5-3b51f86f5100 Correlation ID: 4569f43f-0935-415a-95d8-32718b0606d2 Timestamp: 2026-03-01 21:17:49Z - Correlation ID: 4569f43f-0935-415a-95d8-32718b0606d2 - Trace ID: 0e36510a-7b8d-486b-a9d5-3b51f86f5100
Error getting the secret: invalid_client: 7000222 - [2026-03-01 21:17:49Z]: 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: 90745f10-965e-41da-a999-0c475b7b0900 Correlation ID: ba590194-07c3-497c-a977-05547c174d5d Timestamp: 2026-03-01 21:17:49Z - Correlation ID: ba590194-07c3-497c-a977-05547c174d5d - Trace ID: 90745f10-965e-41da-a999-0c475b7b0900
Error getting the secret: invalid_client: 7000222 - [2026-03-01 21:17:49Z]: 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: 0e36510a-7b8d-486b-a9d5-3b51fd6f5100 Correlation ID: e9ca9527-3fa1-4925-813b-2b38a65c79c4 Timestamp: 2026-03-01 21:17:49Z - Correlation ID: e9ca9527-3fa1-4925-813b-2b38a65c79c4 - Trace ID: 0e36510a-7b8d-486b-a9d5-3b51fd6f5100
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)