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-23 04:21:57Z]: 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: df19203d-03f4-4293-a396-05c6611f1d00 Correlation ID: f90c76a6-39c8-4927-b781-f62101c16e46 Timestamp: 2026-02-23 04:21:57Z - Correlation ID: f90c76a6-39c8-4927-b781-f62101c16e46 - Trace ID: df19203d-03f4-4293-a396-05c6611f1d00
(node:2300) [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-23 04:21:57Z]: 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: 891a96ae-ad82-4934-bee7-f2d6d15e4b00 Correlation ID: fdc0a54e-e685-4eba-833f-d3c6a6162ece Timestamp: 2026-02-23 04:21:57Z - Correlation ID: fdc0a54e-e685-4eba-833f-d3c6a6162ece - Trace ID: 891a96ae-ad82-4934-bee7-f2d6d15e4b00
Error getting the secret: invalid_client: 7000222 - [2026-02-23 04:21:57Z]: 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: 2a57f5c4-b9bf-4bdc-883f-025e91a15400 Correlation ID: 44a06383-2ba5-4aa0-b723-c694eb1bca7e Timestamp: 2026-02-23 04:21:57Z - Correlation ID: 44a06383-2ba5-4aa0-b723-c694eb1bca7e - Trace ID: 2a57f5c4-b9bf-4bdc-883f-025e91a15400
Error getting the secret: invalid_client: 7000222 - [2026-02-23 04:21:57Z]: 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: ee348ced-7593-4b18-a7f3-2b1d91fe5200 Correlation ID: 571dc607-3cd2-427a-8c3d-35956e7087ce Timestamp: 2026-02-23 04:21:57Z - Correlation ID: 571dc607-3cd2-427a-8c3d-35956e7087ce - Trace ID: ee348ced-7593-4b18-a7f3-2b1d91fe5200
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)