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-04-28 13:03:33Z]: 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: e049e2ff-d785-4fd2-aef5-947868786000 Correlation ID: 019757a1-c32e-45e2-96c6-dcbf50379e33 Timestamp: 2026-04-28 13:03:33Z - Correlation ID: 019757a1-c32e-45e2-96c6-dcbf50379e33 - Trace ID: e049e2ff-d785-4fd2-aef5-947868786000
(node:2692) [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-04-28 13:03:33Z]: 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: 0341c8fa-7912-463a-b6d5-9a3b93497d00 Correlation ID: a043cd0f-b33b-414f-810e-58a5c48181ad Timestamp: 2026-04-28 13:03:33Z - Correlation ID: a043cd0f-b33b-414f-810e-58a5c48181ad - Trace ID: 0341c8fa-7912-463a-b6d5-9a3b93497d00
Error getting the secret: invalid_client: 7000222 - [2026-04-28 13:03:34Z]: 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: 88053c43-82b4-4435-8058-361e5d385c00 Correlation ID: f8c5641e-ae07-45e4-9fe2-83528bd677d3 Timestamp: 2026-04-28 13:03:34Z - Correlation ID: f8c5641e-ae07-45e4-9fe2-83528bd677d3 - Trace ID: 88053c43-82b4-4435-8058-361e5d385c00
Error getting the secret: invalid_client: 7000222 - [2026-04-28 13:03:34Z]: 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: 75635149-f6ba-4b7a-83c6-fbd66ed16500 Correlation ID: 8c21cca2-dc13-4009-9800-9b64cde46d8c Timestamp: 2026-04-28 13:03:34Z - Correlation ID: 8c21cca2-dc13-4009-9800-9b64cde46d8c - Trace ID: 75635149-f6ba-4b7a-83c6-fbd66ed16500
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)