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-29 14:14:02Z]: 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: 299028ea-0215-4081-b412-b845cb343600 Correlation ID: dee583cf-a940-4986-b30c-82dcbc8ef72b Timestamp: 2026-04-29 14:14:02Z - Correlation ID: dee583cf-a940-4986-b30c-82dcbc8ef72b - Trace ID: 299028ea-0215-4081-b412-b845cb343600
(node:3176) [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-29 14:14:02Z]: 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: 299028ea-0215-4081-b412-b845d6343600 Correlation ID: 2eb51670-e0a1-4180-9f8e-7ebf2fa01847 Timestamp: 2026-04-29 14:14:02Z - Correlation ID: 2eb51670-e0a1-4180-9f8e-7ebf2fa01847 - Trace ID: 299028ea-0215-4081-b412-b845d6343600
Error getting the secret: invalid_client: 7000222 - [2026-04-29 14:14:02Z]: 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: 9b1efab8-2b62-496b-bef0-0c7ce63f0700 Correlation ID: 3a644e97-d042-405a-b18b-40cfd3c4c5bd Timestamp: 2026-04-29 14:14:02Z - Correlation ID: 3a644e97-d042-405a-b18b-40cfd3c4c5bd - Trace ID: 9b1efab8-2b62-496b-bef0-0c7ce63f0700
Error getting the secret: invalid_client: 7000222 - [2026-04-29 14:14:03Z]: 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: fba5b6fd-e7d4-4f3f-bf17-fa4530960600 Correlation ID: 29506a31-9d98-4bbd-8b06-6f9754b429e7 Timestamp: 2026-04-29 14:14:03Z - Correlation ID: 29506a31-9d98-4bbd-8b06-6f9754b429e7 - Trace ID: fba5b6fd-e7d4-4f3f-bf17-fa4530960600
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)