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-27 23:15:41Z]: 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: ad811f5e-9d1a-4bf7-bdcf-37c9644e2900 Correlation ID: cede98b7-8e4b-471c-8d4f-8388bb69e139 Timestamp: 2026-02-27 23:15:41Z - Correlation ID: cede98b7-8e4b-471c-8d4f-8388bb69e139 - Trace ID: ad811f5e-9d1a-4bf7-bdcf-37c9644e2900
(node:3872) [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-27 23:15:41Z]: 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: 60c06295-4943-4782-9bc7-6af76e092e00 Correlation ID: 4acd79fc-74e3-45ff-bf96-72e831e0eb4d Timestamp: 2026-02-27 23:15:41Z - Correlation ID: 4acd79fc-74e3-45ff-bf96-72e831e0eb4d - Trace ID: 60c06295-4943-4782-9bc7-6af76e092e00
Error getting the secret: invalid_client: 7000222 - [2026-02-27 23:15:41Z]: 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: a403bc56-e7b1-41c0-927e-0b49e4982900 Correlation ID: 313de65a-601b-48bf-bd2d-2403d32ad3f1 Timestamp: 2026-02-27 23:15:41Z - Correlation ID: 313de65a-601b-48bf-bd2d-2403d32ad3f1 - Trace ID: a403bc56-e7b1-41c0-927e-0b49e4982900
Error getting the secret: invalid_client: 7000222 - [2026-02-27 23:15:41Z]: 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: 97ecd571-9897-454f-a291-89fc381d2800 Correlation ID: 98017078-950e-4ffa-beb3-bb6007c67db2 Timestamp: 2026-02-27 23:15:41Z - Correlation ID: 98017078-950e-4ffa-beb3-bb6007c67db2 - Trace ID: 97ecd571-9897-454f-a291-89fc381d2800
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)