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-01-02 07:07:32Z]: 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: ca611638-9d61-4f98-8bb1-159da52c4e00 Correlation ID: f5a11620-59ed-4d17-9cd1-5a08debcbefb Timestamp: 2026-01-02 07:07:32Z - Correlation ID: f5a11620-59ed-4d17-9cd1-5a08debcbefb - Trace ID: ca611638-9d61-4f98-8bb1-159da52c4e00
(node:1240) [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-01-02 07:07:32Z]: 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: 5d0832ed-84e2-4486-a938-d56c55726c01 Correlation ID: 450b8293-58c7-4e48-a284-d702696b36a5 Timestamp: 2026-01-02 07:07:32Z - Correlation ID: 450b8293-58c7-4e48-a284-d702696b36a5 - Trace ID: 5d0832ed-84e2-4486-a938-d56c55726c01
Error getting the secret: invalid_client: 7000222 - [2026-01-02 07:07:32Z]: 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: 57458932-26ed-498e-96b0-48014dab3e00 Correlation ID: 56eca2b3-bb72-40cc-978e-3542674da281 Timestamp: 2026-01-02 07:07:32Z - Correlation ID: 56eca2b3-bb72-40cc-978e-3542674da281 - Trace ID: 57458932-26ed-498e-96b0-48014dab3e00
Error getting the secret: invalid_client: 7000222 - [2026-01-02 07:07:32Z]: 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: e3c4d003-be47-4067-b498-c626cf125c01 Correlation ID: 6481f2b1-655a-47d7-a9c2-4ca8491f5554 Timestamp: 2026-01-02 07:07:32Z - Correlation ID: 6481f2b1-655a-47d7-a9c2-4ca8491f5554 - Trace ID: e3c4d003-be47-4067-b498-c626cf125c01
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)