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-16 03:21:04Z]: 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: 3ad1ae4c-4cff-4b07-b482-dfac48410f00 Correlation ID: bfffd204-179e-4cd4-8593-44dabba67ba1 Timestamp: 2026-05-16 03:21:04Z - Correlation ID: bfffd204-179e-4cd4-8593-44dabba67ba1 - Trace ID: 3ad1ae4c-4cff-4b07-b482-dfac48410f00
(node:5248) [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-16 03:21:04Z]: 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: b1493370-2e42-4ecc-ab3e-33a7f0600200 Correlation ID: cdda634d-8ddc-4469-9609-e9e37cd16ac7 Timestamp: 2026-05-16 03:21:04Z - Correlation ID: cdda634d-8ddc-4469-9609-e9e37cd16ac7 - Trace ID: b1493370-2e42-4ecc-ab3e-33a7f0600200
Error getting the secret: invalid_client: 7000222 - [2026-05-16 03:21:04Z]: 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: 7866feb3-fb89-490f-b23b-e22465f61600 Correlation ID: 81c04af0-8479-493e-ac21-ebb34ca3e19d Timestamp: 2026-05-16 03:21:04Z - Correlation ID: 81c04af0-8479-493e-ac21-ebb34ca3e19d - Trace ID: 7866feb3-fb89-490f-b23b-e22465f61600
Error getting the secret: invalid_client: 7000222 - [2026-05-16 03:21:04Z]: 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: 526425d5-6d57-469d-9c4b-ddecdc580200 Correlation ID: bbfa3e71-d169-4fb6-9194-12eb91241d91 Timestamp: 2026-05-16 03:21:04Z - Correlation ID: bbfa3e71-d169-4fb6-9194-12eb91241d91 - Trace ID: 526425d5-6d57-469d-9c4b-ddecdc580200
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)