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-07 22:49:55Z]: 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: 82543256-c122-4743-8d92-87175c7d1400 Correlation ID: a789f5f1-2f65-4b62-a36b-2de5ecccdd41 Timestamp: 2025-12-07 22:49:55Z - Correlation ID: a789f5f1-2f65-4b62-a36b-2de5ecccdd41 - Trace ID: 82543256-c122-4743-8d92-87175c7d1400
(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-07 22:49:55Z]: 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: d2c42dad-f75b-4159-93a0-063ee05e1500 Correlation ID: 66825b17-6153-41a6-bc8c-1720125a2aa7 Timestamp: 2025-12-07 22:49:55Z - Correlation ID: 66825b17-6153-41a6-bc8c-1720125a2aa7 - Trace ID: d2c42dad-f75b-4159-93a0-063ee05e1500
Error getting the secret: invalid_client: 7000222 - [2025-12-07 22:49:55Z]: 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: 7f8cc55f-c0e7-4ace-acfa-b9b2201e1b00 Correlation ID: 2cf6197b-e48a-411e-b093-2cb6eca6e446 Timestamp: 2025-12-07 22:49:55Z - Correlation ID: 2cf6197b-e48a-411e-b093-2cb6eca6e446 - Trace ID: 7f8cc55f-c0e7-4ace-acfa-b9b2201e1b00
Error getting the secret: invalid_client: 7000222 - [2025-12-07 22:49:56Z]: 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: 503b2be9-e4bd-4aed-a46b-35b468ac1300 Correlation ID: acf2b64c-07f3-4a0d-b6e1-d5d27238ae4f Timestamp: 2025-12-07 22:49:56Z - Correlation ID: acf2b64c-07f3-4a0d-b6e1-d5d27238ae4f - Trace ID: 503b2be9-e4bd-4aed-a46b-35b468ac1300
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)