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-03 05:42: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: 92931748-259d-4603-9c4a-a7deef2b0900 Correlation ID: 44595838-5b0c-42dc-b7fb-72c00ba29e09 Timestamp: 2026-05-03 05:42:17Z - Correlation ID: 44595838-5b0c-42dc-b7fb-72c00ba29e09 - Trace ID: 92931748-259d-4603-9c4a-a7deef2b0900
(node:2284) [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-03 05:42: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: 882a1d7c-c4c5-4b77-9c06-5a732db14300 Correlation ID: 1b34d26c-33c3-442d-b112-900b6d134ee7 Timestamp: 2026-05-03 05:42:17Z - Correlation ID: 1b34d26c-33c3-442d-b112-900b6d134ee7 - Trace ID: 882a1d7c-c4c5-4b77-9c06-5a732db14300
Error getting the secret: invalid_client: 7000222 - [2026-05-03 05:42: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: aa9d8b76-1df7-4b4f-847c-0472806e6600 Correlation ID: e9400778-be5b-4437-8e0d-506cbbde60f4 Timestamp: 2026-05-03 05:42:17Z - Correlation ID: e9400778-be5b-4437-8e0d-506cbbde60f4 - Trace ID: aa9d8b76-1df7-4b4f-847c-0472806e6600
Error getting the secret: invalid_client: 7000222 - [2026-05-03 05:42:18Z]: 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: 92931748-259d-4603-9c4a-a7defc2b0900 Correlation ID: 63683c2a-38ff-4677-ac80-63f3005eb387 Timestamp: 2026-05-03 05:42:18Z - Correlation ID: 63683c2a-38ff-4677-ac80-63f3005eb387 - Trace ID: 92931748-259d-4603-9c4a-a7defc2b0900
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)