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 - [2026-02-28 05:14:50Z]: 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: 8d9da994-1c8c-40ec-8375-ce69ce8c3900 Correlation ID: 9e29e463-8af5-43da-9e16-32b478378002 Timestamp: 2026-02-28 05:14:50Z - Correlation ID: 9e29e463-8af5-43da-9e16-32b478378002 - Trace ID: 8d9da994-1c8c-40ec-8375-ce69ce8c3900
(node:5748) [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 - [2026-02-28 05:14:51Z]: 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: 65454102-7e7b-4928-acb6-ae3469e42000 Correlation ID: 500a7829-e48d-4a86-999b-9814690d9359 Timestamp: 2026-02-28 05:14:51Z - Correlation ID: 500a7829-e48d-4a86-999b-9814690d9359 - Trace ID: 65454102-7e7b-4928-acb6-ae3469e42000
Error getting the secret: invalid_client: 7000222 - [2026-02-28 05:14:51Z]: 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: 1e479165-b1a4-4cd4-b239-313060512a00 Correlation ID: 81a8acfb-e627-44e3-9e83-0631f7c89ec9 Timestamp: 2026-02-28 05:14:51Z - Correlation ID: 81a8acfb-e627-44e3-9e83-0631f7c89ec9 - Trace ID: 1e479165-b1a4-4cd4-b239-313060512a00
Error getting the secret: invalid_client: 7000222 - [2026-02-28 05:14:51Z]: 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: fe003e96-16a1-49f7-b955-2ef388bf0c00 Correlation ID: 35d6efcc-8a0d-4a3f-a83a-ab9907e9eef3 Timestamp: 2026-02-28 05:14:51Z - Correlation ID: 35d6efcc-8a0d-4a3f-a83a-ab9907e9eef3 - Trace ID: fe003e96-16a1-49f7-b955-2ef388bf0c00
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)