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-19 15:33:17Z]: 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: 4ccb7298-f3da-4bd3-b633-db30e93b1300 Correlation ID: e2c00635-c64a-485b-8312-dcad2837aec0 Timestamp: 2026-03-19 15:33:17Z - Correlation ID: e2c00635-c64a-485b-8312-dcad2837aec0 - Trace ID: 4ccb7298-f3da-4bd3-b633-db30e93b1300
(node:5408) [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-19 15:33:17Z]: 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: 6d4af398-de83-4ea7-949b-2ef4eb4d3200 Correlation ID: 8cd161c4-5fa5-4a7b-94ab-ad355d9d04cb Timestamp: 2026-03-19 15:33:17Z - Correlation ID: 8cd161c4-5fa5-4a7b-94ab-ad355d9d04cb - Trace ID: 6d4af398-de83-4ea7-949b-2ef4eb4d3200
Error getting the secret: invalid_client: 7000222 - [2026-03-19 15:33:17Z]: 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: 4be92c0f-d0c9-4051-8dd9-a45eeaad3d00 Correlation ID: 049db430-5472-4533-9bcf-1f57860ffbbb Timestamp: 2026-03-19 15:33:17Z - Correlation ID: 049db430-5472-4533-9bcf-1f57860ffbbb - Trace ID: 4be92c0f-d0c9-4051-8dd9-a45eeaad3d00
Error getting the secret: invalid_client: 7000222 - [2026-03-19 15:33:17Z]: 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: 67975490-73da-41ec-b5fa-bf609c423a00 Correlation ID: f6efabed-d191-4d15-8e36-a4fbead196a6 Timestamp: 2026-03-19 15:33:17Z - Correlation ID: f6efabed-d191-4d15-8e36-a4fbead196a6 - Trace ID: 67975490-73da-41ec-b5fa-bf609c423a00
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)