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-04 06:46: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: 3dddd8a8-82a1-4a2e-aaf4-75a958915d00 Correlation ID: 4964b663-aad4-4538-b4fa-782a691deb86 Timestamp: 2026-05-04 06:46:29Z - Correlation ID: 4964b663-aad4-4538-b4fa-782a691deb86 - Trace ID: 3dddd8a8-82a1-4a2e-aaf4-75a958915d00
(node:4572) [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-04 06:46: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: 3abfb385-bb7a-4d15-b13c-bd60ca828b00 Correlation ID: 6121fa8d-5a4a-4d4b-8ebf-71cc6c0d3b5d Timestamp: 2026-05-04 06:46:29Z - Correlation ID: 6121fa8d-5a4a-4d4b-8ebf-71cc6c0d3b5d - Trace ID: 3abfb385-bb7a-4d15-b13c-bd60ca828b00
Error getting the secret: invalid_client: 7000222 - [2026-05-04 06:46: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: e874af6f-d5d2-4cd7-84fb-7e5576055f00 Correlation ID: cc3d6fbc-9552-402d-9a9e-db701542852a Timestamp: 2026-05-04 06:46:30Z - Correlation ID: cc3d6fbc-9552-402d-9a9e-db701542852a - Trace ID: e874af6f-d5d2-4cd7-84fb-7e5576055f00
Error getting the secret: invalid_client: 7000222 - [2026-05-04 06:46: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: b9c882ec-dbb3-4823-9637-28eb01df9000 Correlation ID: f252f3dc-c6e4-4745-b797-1925438aca92 Timestamp: 2026-05-04 06:46:30Z - Correlation ID: f252f3dc-c6e4-4745-b797-1925438aca92 - Trace ID: b9c882ec-dbb3-4823-9637-28eb01df9000
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)