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-02 14:00:29Z]: 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: c4a0e915-9d5f-441e-b83e-3fac06311900 Correlation ID: c4c2b4ad-157c-40de-91b4-025daea408be Timestamp: 2026-04-02 14:00:29Z - Correlation ID: c4c2b4ad-157c-40de-91b4-025daea408be - Trace ID: c4a0e915-9d5f-441e-b83e-3fac06311900
(node:4796) [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-02 14:00:30Z]: 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: b4c026e1-0957-45ea-a9a9-cf6e13490400 Correlation ID: 981dbde5-4dba-42d1-8488-6680c24cde37 Timestamp: 2026-04-02 14:00:30Z - Correlation ID: 981dbde5-4dba-42d1-8488-6680c24cde37 - Trace ID: b4c026e1-0957-45ea-a9a9-cf6e13490400
Error getting the secret: invalid_client: 7000222 - [2026-04-02 14:00:30Z]: 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: f24bf080-84c0-4e83-9ae9-2a938ff91a00 Correlation ID: f92a1d6f-2ac7-4854-9a77-5db4d517da89 Timestamp: 2026-04-02 14:00:30Z - Correlation ID: f92a1d6f-2ac7-4854-9a77-5db4d517da89 - Trace ID: f24bf080-84c0-4e83-9ae9-2a938ff91a00
Error getting the secret: invalid_client: 7000222 - [2026-04-02 14:00:30Z]: 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: a64a0849-c79e-423a-a991-0b9b295b1a00 Correlation ID: f955b465-1784-45e3-8161-f2b2ccbffd64 Timestamp: 2026-04-02 14:00:30Z - Correlation ID: f955b465-1784-45e3-8161-f2b2ccbffd64 - Trace ID: a64a0849-c79e-423a-a991-0b9b295b1a00
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)