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-02 06:10:09Z]: 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: f21c7961-4cd9-4414-9e65-6c187bb13a00 Correlation ID: 0318e904-b56b-4345-84db-b0723b6189bf Timestamp: 2026-05-02 06:10:09Z - Correlation ID: 0318e904-b56b-4345-84db-b0723b6189bf - Trace ID: f21c7961-4cd9-4414-9e65-6c187bb13a00
(node:972) [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-02 06:10:10Z]: 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: 0099fd32-dc5e-4a10-8469-1e694fc51100 Correlation ID: 0c478dcc-364f-4f49-b9d7-cca7c2b77436 Timestamp: 2026-05-02 06:10:10Z - Correlation ID: 0c478dcc-364f-4f49-b9d7-cca7c2b77436 - Trace ID: 0099fd32-dc5e-4a10-8469-1e694fc51100
Error getting the secret: invalid_client: 7000222 - [2026-05-02 06:10:10Z]: 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: f21c7961-4cd9-4414-9e65-6c187eb13a00 Correlation ID: f1bf7eec-b13e-46a8-81a7-837cf8e71e14 Timestamp: 2026-05-02 06:10:10Z - Correlation ID: f1bf7eec-b13e-46a8-81a7-837cf8e71e14 - Trace ID: f21c7961-4cd9-4414-9e65-6c187eb13a00
Error getting the secret: invalid_client: 7000222 - [2026-05-02 06:10:10Z]: 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: dcab2cdd-656c-4240-a220-ea2f0f483200 Correlation ID: 319feab1-cc8d-4ed0-bb27-2576a645dbfc Timestamp: 2026-05-02 06:10:10Z - Correlation ID: 319feab1-cc8d-4ed0-bb27-2576a645dbfc - Trace ID: dcab2cdd-656c-4240-a220-ea2f0f483200
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)