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-03-17 16:38:04Z]: 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: 487f500f-5efb-4a22-be2f-8b9c6a080f00 Correlation ID: e4a2f857-56f7-4c51-83d8-87ef4f94e8bc Timestamp: 2026-03-17 16:38:04Z - Correlation ID: e4a2f857-56f7-4c51-83d8-87ef4f94e8bc - Trace ID: 487f500f-5efb-4a22-be2f-8b9c6a080f00
(node:1924) [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-03-17 16:38:04Z]: 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: 698008cf-6624-4862-ac75-397f44710e00 Correlation ID: 5e8558fc-d0e1-47bb-be51-e30fc6e1961d Timestamp: 2026-03-17 16:38:04Z - Correlation ID: 5e8558fc-d0e1-47bb-be51-e30fc6e1961d - Trace ID: 698008cf-6624-4862-ac75-397f44710e00
Error getting the secret: invalid_client: 7000222 - [2026-03-17 16:38:04Z]: 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: 222428ce-5f2a-40e2-a93e-37a8ea0f1000 Correlation ID: e054f4a2-f672-4531-a1f0-94c8fc1b3b93 Timestamp: 2026-03-17 16:38:04Z - Correlation ID: e054f4a2-f672-4531-a1f0-94c8fc1b3b93 - Trace ID: 222428ce-5f2a-40e2-a93e-37a8ea0f1000
Error getting the secret: invalid_client: 7000222 - [2026-03-17 16:38:05Z]: 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: ab9c4b60-f3d7-4207-8c87-118cf9520f00 Correlation ID: 088ab291-ecc8-4e45-aaf9-ee4ba7f57ece Timestamp: 2026-03-17 16:38:05Z - Correlation ID: 088ab291-ecc8-4e45-aaf9-ee4ba7f57ece - Trace ID: ab9c4b60-f3d7-4207-8c87-118cf9520f00
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)