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-26 03:57: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: b04acdf3-9e19-4330-a536-0db90ae11900 Correlation ID: 54860d55-a813-4254-a6ad-f2e2ecc95c6a Timestamp: 2025-12-26 03:57:46Z - Correlation ID: 54860d55-a813-4254-a6ad-f2e2ecc95c6a - Trace ID: b04acdf3-9e19-4330-a536-0db90ae11900
(node:6044) [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-26 03:57: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: 9c9b83ee-9e37-4c82-a264-15950e4d9c00 Correlation ID: faaf9fe8-f9c6-4b49-adea-4ca4d3ae1a0a Timestamp: 2025-12-26 03:57:46Z - Correlation ID: faaf9fe8-f9c6-4b49-adea-4ca4d3ae1a0a - Trace ID: 9c9b83ee-9e37-4c82-a264-15950e4d9c00
Error getting the secret: invalid_client: 7000222 - [2025-12-26 03:57: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: 9c9b83ee-9e37-4c82-a264-1595134d9c00 Correlation ID: 958373d8-f4ce-4a78-8eec-8c0c12039fce Timestamp: 2025-12-26 03:57:46Z - Correlation ID: 958373d8-f4ce-4a78-8eec-8c0c12039fce - Trace ID: 9c9b83ee-9e37-4c82-a264-1595134d9c00
Error getting the secret: invalid_client: 7000222 - [2025-12-26 03:57: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: 4bd7bcfe-24cc-4833-88dd-de02962d8f00 Correlation ID: af50d63c-9025-47c9-9d33-bfdeb0134f57 Timestamp: 2025-12-26 03:57:47Z - Correlation ID: af50d63c-9025-47c9-9d33-bfdeb0134f57 - Trace ID: 4bd7bcfe-24cc-4833-88dd-de02962d8f00
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)