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-02-25 01:11:30Z]: 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: fb459609-8653-4d41-8787-dd2cda2b2700 Correlation ID: ddb37793-5165-4a81-9770-62c0c9b3aadb Timestamp: 2026-02-25 01:11:30Z - Correlation ID: ddb37793-5165-4a81-9770-62c0c9b3aadb - Trace ID: fb459609-8653-4d41-8787-dd2cda2b2700
(node:1240) [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-02-25 01:11:30Z]: 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: fb459609-8653-4d41-8787-dd2cde2b2700 Correlation ID: fe54bd28-5c1a-4275-9bd8-84c3f824bc2e Timestamp: 2026-02-25 01:11:30Z - Correlation ID: fe54bd28-5c1a-4275-9bd8-84c3f824bc2e - Trace ID: fb459609-8653-4d41-8787-dd2cde2b2700
Error getting the secret: invalid_client: 7000222 - [2026-02-25 01:11: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: 193c3d83-814a-4e7c-8c70-213cc45c8300 Correlation ID: 3998628a-fed5-456c-9f2e-7aac033d1263 Timestamp: 2026-02-25 01:11:31Z - Correlation ID: 3998628a-fed5-456c-9f2e-7aac033d1263 - Trace ID: 193c3d83-814a-4e7c-8c70-213cc45c8300
Error getting the secret: invalid_client: 7000222 - [2026-02-25 01:11: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: 42dc39b1-015b-43d0-b468-1cd690691200 Correlation ID: 89e4ec01-473b-487d-ad17-07a76b2ce9f6 Timestamp: 2026-02-25 01:11:31Z - Correlation ID: 89e4ec01-473b-487d-ad17-07a76b2ce9f6 - Trace ID: 42dc39b1-015b-43d0-b468-1cd690691200
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)