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-28 23:32:12Z]: 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: 14be445e-b958-430a-a67b-8d0ae7893c00 Correlation ID: 1a11f16f-b420-4f06-bbb8-c414a77a2419 Timestamp: 2026-02-28 23:32:12Z - Correlation ID: 1a11f16f-b420-4f06-bbb8-c414a77a2419 - Trace ID: 14be445e-b958-430a-a67b-8d0ae7893c00
(node:3292) [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-28 23:32:12Z]: 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: 5663fbf0-6abc-4c20-80b5-80bfccef4000 Correlation ID: 6f4e7ed1-c34f-4105-aeb8-c822baec0e6d Timestamp: 2026-02-28 23:32:12Z - Correlation ID: 6f4e7ed1-c34f-4105-aeb8-c822baec0e6d - Trace ID: 5663fbf0-6abc-4c20-80b5-80bfccef4000
Error getting the secret: invalid_client: 7000222 - [2026-02-28 23:32:12Z]: 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: 115ff301-ee27-4f12-898f-eeb38de85b00 Correlation ID: f05f1515-7c5e-4812-af32-306d169d4cdc Timestamp: 2026-02-28 23:32:12Z - Correlation ID: f05f1515-7c5e-4812-af32-306d169d4cdc - Trace ID: 115ff301-ee27-4f12-898f-eeb38de85b00
Error getting the secret: invalid_client: 7000222 - [2026-02-28 23:32:13Z]: 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: bcde93d8-8b1a-4bdd-b7d9-cb7172243b00 Correlation ID: 437d5e87-082a-4296-a750-0d4044348e7e Timestamp: 2026-02-28 23:32:13Z - Correlation ID: 437d5e87-082a-4296-a750-0d4044348e7e - Trace ID: bcde93d8-8b1a-4bdd-b7d9-cb7172243b00
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)