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-01-12 07:07:25Z]: 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: 6fdc138f-6f27-4330-8ccf-2f06d90a0100 Correlation ID: 763c9256-7b55-44a4-9855-f3ee9a797629 Timestamp: 2026-01-12 07:07:25Z - Correlation ID: 763c9256-7b55-44a4-9855-f3ee9a797629 - Trace ID: 6fdc138f-6f27-4330-8ccf-2f06d90a0100
(node:4360) [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-01-12 07:07:25Z]: 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: c0af725a-ef3b-4488-a05a-4223116d1900 Correlation ID: 371bfc66-5636-4539-8447-1fe90cbdd4a7 Timestamp: 2026-01-12 07:07:25Z - Correlation ID: 371bfc66-5636-4539-8447-1fe90cbdd4a7 - Trace ID: c0af725a-ef3b-4488-a05a-4223116d1900
Error getting the secret: invalid_client: 7000222 - [2026-01-12 07:07:25Z]: 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: 0d10cd5f-08c8-413b-8345-70d392e01000 Correlation ID: 1ca05d44-ae40-4815-994c-2c5c749e4683 Timestamp: 2026-01-12 07:07:25Z - Correlation ID: 1ca05d44-ae40-4815-994c-2c5c749e4683 - Trace ID: 0d10cd5f-08c8-413b-8345-70d392e01000
Error getting the secret: invalid_client: 7000222 - [2026-01-12 07:07:25Z]: 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: 6fdc138f-6f27-4330-8ccf-2f06e90a0100 Correlation ID: cd2da023-aee1-41dc-9703-1604c13ca367 Timestamp: 2026-01-12 07:07:25Z - Correlation ID: cd2da023-aee1-41dc-9703-1604c13ca367 - Trace ID: 6fdc138f-6f27-4330-8ccf-2f06e90a0100
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)