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-20 20:24:08Z]: 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: 5bd4464e-b51a-41b6-b907-9f40843c1200 Correlation ID: b4c4f06d-7ef2-4856-aec8-d15a4f8689f8 Timestamp: 2025-12-20 20:24:08Z - Correlation ID: b4c4f06d-7ef2-4856-aec8-d15a4f8689f8 - Trace ID: 5bd4464e-b51a-41b6-b907-9f40843c1200
(node:5504) [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-20 20:24:08Z]: 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: ce6c1f06-e54b-4cbb-abe8-780f16171a00 Correlation ID: 05a358d9-d413-487d-a192-82ce42fced15 Timestamp: 2025-12-20 20:24:08Z - Correlation ID: 05a358d9-d413-487d-a192-82ce42fced15 - Trace ID: ce6c1f06-e54b-4cbb-abe8-780f16171a00
Error getting the secret: invalid_client: 7000222 - [2025-12-20 20:24:08Z]: 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: c3e6ce8d-707c-40e5-aad7-a03626131800 Correlation ID: 68afef3d-2374-4683-88df-d4c63fc546c8 Timestamp: 2025-12-20 20:24:08Z - Correlation ID: 68afef3d-2374-4683-88df-d4c63fc546c8 - Trace ID: c3e6ce8d-707c-40e5-aad7-a03626131800
Error getting the secret: invalid_client: 7000222 - [2025-12-20 20:24:09Z]: 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: 669172c7-1f23-434a-aabb-5b76ed471700 Correlation ID: 15e5b64a-2142-422b-8428-8a7889346770 Timestamp: 2025-12-20 20:24:09Z - Correlation ID: 15e5b64a-2142-422b-8428-8a7889346770 - Trace ID: 669172c7-1f23-434a-aabb-5b76ed471700
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)