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 - [2025-11-25 12:57: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: c836ec8c-5677-46c0-ab16-2885fc5b3300 Correlation ID: bc9328f3-fbad-4b68-b7ec-d57ac29fc6ad Timestamp: 2025-11-25 12:57:41Z - Correlation ID: bc9328f3-fbad-4b68-b7ec-d57ac29fc6ad - Trace ID: c836ec8c-5677-46c0-ab16-2885fc5b3300
(node:3164) [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 - [2025-11-25 12:57:42Z]: 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: 1aa78b0f-7554-4828-b353-37ebc1e92c00 Correlation ID: 088c4c7e-76ff-4587-be4d-0f89977697f2 Timestamp: 2025-11-25 12:57:42Z - Correlation ID: 088c4c7e-76ff-4587-be4d-0f89977697f2 - Trace ID: 1aa78b0f-7554-4828-b353-37ebc1e92c00
Error getting the secret: invalid_client: 7000222 - [2025-11-25 12:57:42Z]: 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: fd56100c-fc86-4d93-b490-0319ebd02400 Correlation ID: 7abd7982-7a3d-4fef-b9a2-7be249286ca2 Timestamp: 2025-11-25 12:57:42Z - Correlation ID: 7abd7982-7a3d-4fef-b9a2-7be249286ca2 - Trace ID: fd56100c-fc86-4d93-b490-0319ebd02400
Error getting the secret: invalid_client: 7000222 - [2025-11-25 12:57:42Z]: 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: ab0fee92-39f8-4a40-88c9-c4fca9320200 Correlation ID: 3aa1f984-e251-4eaf-bfaf-d36ecd650c29 Timestamp: 2025-11-25 12:57:42Z - Correlation ID: 3aa1f984-e251-4eaf-bfaf-d36ecd650c29 - Trace ID: ab0fee92-39f8-4a40-88c9-c4fca9320200
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)