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-12-01 13:38:26Z]: 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: 087fdbf0-9de1-4313-83cc-53896e1c6600 Correlation ID: 10850d46-d880-4b13-be7a-028d42f52afd Timestamp: 2026-12-01 13:38:26Z - Correlation ID: 10850d46-d880-4b13-be7a-028d42f52afd - Trace ID: 087fdbf0-9de1-4313-83cc-53896e1c6600
(node:3040) [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-12-01 13:38:27Z]: 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: a837d6f9-4763-4dfd-88c0-a33e9a746f00 Correlation ID: a9bbf6f8-e4e1-4cde-94ca-518ff5edde34 Timestamp: 2026-12-01 13:38:27Z - Correlation ID: a9bbf6f8-e4e1-4cde-94ca-518ff5edde34 - Trace ID: a837d6f9-4763-4dfd-88c0-a33e9a746f00
Error getting the secret: invalid_client: 7000222 - [2026-12-01 13:38:27Z]: 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: 06ce2518-f067-4afa-88e9-3af85ecd7500 Correlation ID: 8f22d457-0819-4bb7-b1da-92b4272eccab Timestamp: 2026-12-01 13:38:27Z - Correlation ID: 8f22d457-0819-4bb7-b1da-92b4272eccab - Trace ID: 06ce2518-f067-4afa-88e9-3af85ecd7500
Error getting the secret: invalid_client: 7000222 - [2026-12-01 13:38:27Z]: 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: 0df4e1f2-ed0d-4eaf-bc52-52116ef97900 Correlation ID: 03e6b70a-2cdd-4474-9b6a-088bdfe2c540 Timestamp: 2026-12-01 13:38:27Z - Correlation ID: 03e6b70a-2cdd-4474-9b6a-088bdfe2c540 - Trace ID: 0df4e1f2-ed0d-4eaf-bc52-52116ef97900
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)