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-11 15:17: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: f90413cb-1919-40ac-a0a0-b081d5d90e00 Correlation ID: b2a90225-65f5-44ba-8712-a99ef6cba31f Timestamp: 2026-04-11 15:17:49Z - Correlation ID: b2a90225-65f5-44ba-8712-a99ef6cba31f - Trace ID: f90413cb-1919-40ac-a0a0-b081d5d90e00
(node:6108) [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-11 15:17: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: 9a6ddf25-8e44-4182-a94c-5a6b39990f00 Correlation ID: 80061903-74ec-4969-bd30-8ed1c15c03f8 Timestamp: 2026-04-11 15:17:49Z - Correlation ID: 80061903-74ec-4969-bd30-8ed1c15c03f8 - Trace ID: 9a6ddf25-8e44-4182-a94c-5a6b39990f00
Error getting the secret: invalid_client: 7000222 - [2026-04-11 15:17: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: 734e07cf-8dac-40c4-8d39-3536f7391300 Correlation ID: e8c4c488-6daf-4b8b-9cc1-dd5e28dd1c54 Timestamp: 2026-04-11 15:17:49Z - Correlation ID: e8c4c488-6daf-4b8b-9cc1-dd5e28dd1c54 - Trace ID: 734e07cf-8dac-40c4-8d39-3536f7391300
Error getting the secret: invalid_client: 7000222 - [2026-04-11 15:17:50Z]: 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: f90413cb-1919-40ac-a0a0-b081efd90e00 Correlation ID: 09630f35-6531-47a5-a1fc-30a59197ff05 Timestamp: 2026-04-11 15:17:50Z - Correlation ID: 09630f35-6531-47a5-a1fc-30a59197ff05 - Trace ID: f90413cb-1919-40ac-a0a0-b081efd90e00
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)