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-24 16:31:46Z]: 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: 7e862ec2-0d62-4e3f-aa0c-249c2f470c00 Correlation ID: 4fe68cb4-d24a-4cc1-adc6-820ac8e1cf91 Timestamp: 2025-11-24 16:31:46Z - Correlation ID: 4fe68cb4-d24a-4cc1-adc6-820ac8e1cf91 - Trace ID: 7e862ec2-0d62-4e3f-aa0c-249c2f470c00
(node:6092) [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-24 16:31:46Z]: 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: 7e862ec2-0d62-4e3f-aa0c-249c45470c00 Correlation ID: 856a7332-0dfb-46de-8b39-e65c88544e1a Timestamp: 2025-11-24 16:31:46Z - Correlation ID: 856a7332-0dfb-46de-8b39-e65c88544e1a - Trace ID: 7e862ec2-0d62-4e3f-aa0c-249c45470c00
Error getting the secret: invalid_client: 7000222 - [2025-11-24 16:31:46Z]: 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: e2f320af-4bf9-4bd5-9c20-6f6289f12100 Correlation ID: 64b33ea2-e11a-4f13-a004-b418498a48ed Timestamp: 2025-11-24 16:31:46Z - Correlation ID: 64b33ea2-e11a-4f13-a004-b418498a48ed - Trace ID: e2f320af-4bf9-4bd5-9c20-6f6289f12100
Error getting the secret: invalid_client: 7000222 - [2025-11-24 16:31:47Z]: 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: d65e1658-bc51-4795-a7cc-dcde2c900800 Correlation ID: af522ab9-a4a2-47c1-b54f-9b703f7379eb Timestamp: 2025-11-24 16:31:47Z - Correlation ID: af522ab9-a4a2-47c1-b54f-9b703f7379eb - Trace ID: d65e1658-bc51-4795-a7cc-dcde2c900800
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)