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-01 20:33:48Z]: 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: e6cbc666-5c69-4dc7-8355-227a1d531000 Correlation ID: 92c989af-36e8-4ab6-85e6-ae322aa836f5 Timestamp: 2026-04-01 20:33:48Z - Correlation ID: 92c989af-36e8-4ab6-85e6-ae322aa836f5 - Trace ID: e6cbc666-5c69-4dc7-8355-227a1d531000
(node:3084) [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-01 20:33:48Z]: 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: 0d0dadb4-5df9-4d53-9bd9-60fdeed00700 Correlation ID: c2a46ec9-abb1-4f8c-9a67-df917d5ee67d Timestamp: 2026-04-01 20:33:48Z - Correlation ID: c2a46ec9-abb1-4f8c-9a67-df917d5ee67d - Trace ID: 0d0dadb4-5df9-4d53-9bd9-60fdeed00700
Error getting the secret: invalid_client: 7000222 - [2026-04-01 20:33:49Z]: 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: e6cbc666-5c69-4dc7-8355-227a22531000 Correlation ID: 1cef8d43-f2ba-46c9-85d8-af8da21d7009 Timestamp: 2026-04-01 20:33:49Z - Correlation ID: 1cef8d43-f2ba-46c9-85d8-af8da21d7009 - Trace ID: e6cbc666-5c69-4dc7-8355-227a22531000
Error getting the secret: invalid_client: 7000222 - [2026-04-01 20:33:49Z]: 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: 5e24a619-4e3f-42ed-874f-c78a06cf0a00 Correlation ID: ad1ff589-2ca8-40db-97c7-ad952e637a37 Timestamp: 2026-04-01 20:33:49Z - Correlation ID: ad1ff589-2ca8-40db-97c7-ad952e637a37 - Trace ID: 5e24a619-4e3f-42ed-874f-c78a06cf0a00
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)