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-26 00:18:32Z]: 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: cd3b65a3-d178-462a-81c5-e31f78a51900 Correlation ID: 844d3613-449d-4657-8271-11e11ab55b07 Timestamp: 2026-04-26 00:18:32Z - Correlation ID: 844d3613-449d-4657-8271-11e11ab55b07 - Trace ID: cd3b65a3-d178-462a-81c5-e31f78a51900
(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-04-26 00:18:32Z]: 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: cd3b65a3-d178-462a-81c5-e31f7da51900 Correlation ID: ee8a4c5b-2632-41e3-bc2f-da3bdf0e72ff Timestamp: 2026-04-26 00:18:32Z - Correlation ID: ee8a4c5b-2632-41e3-bc2f-da3bdf0e72ff - Trace ID: cd3b65a3-d178-462a-81c5-e31f7da51900
Error getting the secret: invalid_client: 7000222 - [2026-04-26 00:18:32Z]: 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: e5d43d35-5154-46e2-acb7-792826064100 Correlation ID: c6192d33-40f3-4b97-831e-54d2af092b9e Timestamp: 2026-04-26 00:18:32Z - Correlation ID: c6192d33-40f3-4b97-831e-54d2af092b9e - Trace ID: e5d43d35-5154-46e2-acb7-792826064100
Error getting the secret: invalid_client: 7000222 - [2026-04-26 00:18:32Z]: 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: 5b6bbaf8-5693-4c72-a396-335b3de81a00 Correlation ID: 31e308ae-b8e0-42c2-83fb-087b8f4f3b85 Timestamp: 2026-04-26 00:18:32Z - Correlation ID: 31e308ae-b8e0-42c2-83fb-087b8f4f3b85 - Trace ID: 5b6bbaf8-5693-4c72-a396-335b3de81a00
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)