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-05-01 14:19: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: bd93056f-5639-4186-9b49-736b407e2200 Correlation ID: 5b750182-4bfc-40f2-bde1-26e334102340 Timestamp: 2026-05-01 14:19:29Z - Correlation ID: 5b750182-4bfc-40f2-bde1-26e334102340 - Trace ID: bd93056f-5639-4186-9b49-736b407e2200
(node:3256) [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-05-01 14:19:30Z]: 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: c7c3007f-cef1-4b37-842a-42fc19952500 Correlation ID: c64f45b9-23aa-4b41-9c3a-199ab1da28c6 Timestamp: 2026-05-01 14:19:30Z - Correlation ID: c64f45b9-23aa-4b41-9c3a-199ab1da28c6 - Trace ID: c7c3007f-cef1-4b37-842a-42fc19952500
Error getting the secret: invalid_client: 7000222 - [2026-05-01 14:19:30Z]: 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: 67f0f8b8-d38e-4a3b-ac1e-f51c91e60500 Correlation ID: 50eaa106-4071-40e2-9faa-fcd7fc2deeb9 Timestamp: 2026-05-01 14:19:30Z - Correlation ID: 50eaa106-4071-40e2-9faa-fcd7fc2deeb9 - Trace ID: 67f0f8b8-d38e-4a3b-ac1e-f51c91e60500
Error getting the secret: invalid_client: 7000222 - [2026-05-01 14:19:30Z]: 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: 51c0bbb6-0c41-4661-a11c-9b3809434400 Correlation ID: eb52bbb7-6d80-424d-bc40-6386550375f0 Timestamp: 2026-05-01 14:19:30Z - Correlation ID: eb52bbb7-6d80-424d-bc40-6386550375f0 - Trace ID: 51c0bbb6-0c41-4661-a11c-9b3809434400
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)