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-23 06:13:31Z]: 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: 36b6589c-d5c3-4a4c-8845-b753c7427400 Correlation ID: c84f5f8d-935a-4de8-8b39-45fabd007ab2 Timestamp: 2026-04-23 06:13:31Z - Correlation ID: c84f5f8d-935a-4de8-8b39-45fabd007ab2 - Trace ID: 36b6589c-d5c3-4a4c-8845-b753c7427400
(node:5676) [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-23 06:13:31Z]: 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: 533af674-c407-4efa-a4ac-787d6d6e4600 Correlation ID: 50c3c213-457e-4c82-822d-5decd8f48640 Timestamp: 2026-04-23 06:13:31Z - Correlation ID: 50c3c213-457e-4c82-822d-5decd8f48640 - Trace ID: 533af674-c407-4efa-a4ac-787d6d6e4600
Error getting the secret: invalid_client: 7000222 - [2026-04-23 06:13:31Z]: 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: b44c5a70-c6cf-481a-b575-d41af8a42300 Correlation ID: a535d8cc-26ec-498c-8398-c9acd15bbe75 Timestamp: 2026-04-23 06:13:31Z - Correlation ID: a535d8cc-26ec-498c-8398-c9acd15bbe75 - Trace ID: b44c5a70-c6cf-481a-b575-d41af8a42300
Error getting the secret: invalid_client: 7000222 - [2026-04-23 06:13:31Z]: 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: fed4efa6-fc0f-4eae-9edf-cb3dd10f0500 Correlation ID: ba23b5cd-4e5b-4a94-a815-b7a6f4d26ec6 Timestamp: 2026-04-23 06:13:31Z - Correlation ID: ba23b5cd-4e5b-4a94-a815-b7a6f4d26ec6 - Trace ID: fed4efa6-fc0f-4eae-9edf-cb3dd10f0500
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)