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-12-21 01:33:03Z]: 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: 1b123244-6763-450c-b2f5-2797aedc1800 Correlation ID: 00fcc3f6-a072-40e4-bcb6-93f2e1120458 Timestamp: 2025-12-21 01:33:03Z - Correlation ID: 00fcc3f6-a072-40e4-bcb6-93f2e1120458 - Trace ID: 1b123244-6763-450c-b2f5-2797aedc1800
(node:1032) [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-12-21 01:33:03Z]: 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: cae78f27-a65a-4a6e-a791-f5f940683000 Correlation ID: 6a73b56c-5a51-4633-8972-ffc7852bb992 Timestamp: 2025-12-21 01:33:03Z - Correlation ID: 6a73b56c-5a51-4633-8972-ffc7852bb992 - Trace ID: cae78f27-a65a-4a6e-a791-f5f940683000
Error getting the secret: invalid_client: 7000222 - [2025-12-21 01:33:03Z]: 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: 7c3276a2-c5cf-44fe-88b6-eda3305d1a00 Correlation ID: 7e36ebf0-c2b5-46ec-9535-57209e05c232 Timestamp: 2025-12-21 01:33:03Z - Correlation ID: 7e36ebf0-c2b5-46ec-9535-57209e05c232 - Trace ID: 7c3276a2-c5cf-44fe-88b6-eda3305d1a00
Error getting the secret: invalid_client: 7000222 - [2025-12-21 01:33:03Z]: 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: b32037bd-5200-4d7d-902a-2d52e2ff2d00 Correlation ID: f8dfd7c1-05b9-4ef1-a5e4-f5ee308b6408 Timestamp: 2025-12-21 01:33:03Z - Correlation ID: f8dfd7c1-05b9-4ef1-a5e4-f5ee308b6408 - Trace ID: b32037bd-5200-4d7d-902a-2d52e2ff2d00
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)