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-27 02:06:27Z]: 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: 42a46aaa-8c9b-419b-aced-d33eb8c5b900 Correlation ID: 94f2a70f-31e1-48d9-99d1-490820b24ff8 Timestamp: 2025-12-27 02:06:27Z - Correlation ID: 94f2a70f-31e1-48d9-99d1-490820b24ff8 - Trace ID: 42a46aaa-8c9b-419b-aced-d33eb8c5b900
(node:296) [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-27 02:06:28Z]: 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: 4c034043-1613-43fb-ab4c-285445c94400 Correlation ID: f1625ea0-d3ca-49a4-b9b0-72b3afe4b98a Timestamp: 2025-12-27 02:06:28Z - Correlation ID: f1625ea0-d3ca-49a4-b9b0-72b3afe4b98a - Trace ID: 4c034043-1613-43fb-ab4c-285445c94400
Error getting the secret: invalid_client: 7000222 - [2025-12-27 02:06:28Z]: 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: 8f8d4645-685d-43fa-b0e0-2e6185db9f00 Correlation ID: 632e9bd6-e171-4e3d-946a-70fc382f2df6 Timestamp: 2025-12-27 02:06:28Z - Correlation ID: 632e9bd6-e171-4e3d-946a-70fc382f2df6 - Trace ID: 8f8d4645-685d-43fa-b0e0-2e6185db9f00
Error getting the secret: invalid_client: 7000222 - [2025-12-27 02:06:28Z]: 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: afa67cfd-d26f-4a88-98fc-dcefb17e1f00 Correlation ID: a5081364-7c5a-4e0b-98d6-c49bf205f56c Timestamp: 2025-12-27 02:06:28Z - Correlation ID: a5081364-7c5a-4e0b-98d6-c49bf205f56c - Trace ID: afa67cfd-d26f-4a88-98fc-dcefb17e1f00
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)