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-04-06 22:26:31Z]: 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: f6d3ef3c-678f-4839-b9e1-a15edb170500 Correlation ID: e4193302-6bd4-4a14-9830-b2e0fd6c666f Timestamp: 2026-04-06 22:26:31Z - Correlation ID: e4193302-6bd4-4a14-9830-b2e0fd6c666f - Trace ID: f6d3ef3c-678f-4839-b9e1-a15edb170500
(node:4932) [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-04-06 22:26:31Z]: 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: fac4bde4-add8-4781-beba-619f4b920600 Correlation ID: 5ccd5be0-17fe-4867-9cd2-61f80364b239 Timestamp: 2026-04-06 22:26:31Z - Correlation ID: 5ccd5be0-17fe-4867-9cd2-61f80364b239 - Trace ID: fac4bde4-add8-4781-beba-619f4b920600
Error getting the secret: invalid_client: 7000222 - [2026-04-06 22:26:31Z]: 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: b0ea744d-d9a5-4ab1-9fab-5c139eb74900 Correlation ID: 237fb7e7-a3bd-4676-9b0e-738293bb1f61 Timestamp: 2026-04-06 22:26:31Z - Correlation ID: 237fb7e7-a3bd-4676-9b0e-738293bb1f61 - Trace ID: b0ea744d-d9a5-4ab1-9fab-5c139eb74900
Error getting the secret: invalid_client: 7000222 - [2026-04-06 22:26:31Z]: 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: 0fce83d0-4ae2-43ec-a2f4-7ef88b9a0500 Correlation ID: 9753fabc-10c1-4a76-9349-1596b384c704 Timestamp: 2026-04-06 22:26:31Z - Correlation ID: 9753fabc-10c1-4a76-9349-1596b384c704 - Trace ID: 0fce83d0-4ae2-43ec-a2f4-7ef88b9a0500
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)