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-30 13:04:41Z]: 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: bdd1cd62-2c68-42ae-9619-d859456f0300 Correlation ID: d387b77c-83a9-4010-9f85-58992bc91fad Timestamp: 2026-04-30 13:04:41Z - Correlation ID: d387b77c-83a9-4010-9f85-58992bc91fad - Trace ID: bdd1cd62-2c68-42ae-9619-d859456f0300
(node:5616) [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-30 13:04:42Z]: 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: c1da0b16-2c92-45a3-89d7-853c3c220500 Correlation ID: cbf8a686-2a69-4ebc-b9de-fd7ef9426d67 Timestamp: 2026-04-30 13:04:42Z - Correlation ID: cbf8a686-2a69-4ebc-b9de-fd7ef9426d67 - Trace ID: c1da0b16-2c92-45a3-89d7-853c3c220500
Error getting the secret: invalid_client: 7000222 - [2026-04-30 13:04:42Z]: 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: 7a1d3404-0a73-48be-a61c-192ec1b40300 Correlation ID: 6ad78a78-1d81-444c-926a-eaa837634363 Timestamp: 2026-04-30 13:04:42Z - Correlation ID: 6ad78a78-1d81-444c-926a-eaa837634363 - Trace ID: 7a1d3404-0a73-48be-a61c-192ec1b40300
Error getting the secret: invalid_client: 7000222 - [2026-04-30 13:04:42Z]: 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: 36dff2db-f89d-47fc-bd55-f7724b4a0400 Correlation ID: 656cc717-5e86-4e6f-9335-460c15f2d75c Timestamp: 2026-04-30 13:04:42Z - Correlation ID: 656cc717-5e86-4e6f-9335-460c15f2d75c - Trace ID: 36dff2db-f89d-47fc-bd55-f7724b4a0400
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)