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 - [2025-12-29 08:52:35Z]: 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: 61c8d729-58f2-4b2b-8574-a60b05aece00 Correlation ID: 171709ad-f959-421a-9398-1cf892ca2689 Timestamp: 2025-12-29 08:52:35Z - Correlation ID: 171709ad-f959-421a-9398-1cf892ca2689 - Trace ID: 61c8d729-58f2-4b2b-8574-a60b05aece00
(node:3948) [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 - [2025-12-29 08:52:35Z]: 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: 61c8d729-58f2-4b2b-8574-a60b0eaece00 Correlation ID: a429e73f-8299-40c9-b3dd-372c552c7667 Timestamp: 2025-12-29 08:52:35Z - Correlation ID: a429e73f-8299-40c9-b3dd-372c552c7667 - Trace ID: 61c8d729-58f2-4b2b-8574-a60b0eaece00
Error getting the secret: invalid_client: 7000222 - [2025-12-29 08:52:35Z]: 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: 61c8d729-58f2-4b2b-8574-a60b15aece00 Correlation ID: 1cceebb3-b834-4c2c-a591-7840f90b5b91 Timestamp: 2025-12-29 08:52:35Z - Correlation ID: 1cceebb3-b834-4c2c-a591-7840f90b5b91 - Trace ID: 61c8d729-58f2-4b2b-8574-a60b15aece00
Error getting the secret: invalid_client: 7000222 - [2025-12-29 08:52:36Z]: 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: 9a45406e-c59f-46d6-a289-4a93e710c900 Correlation ID: 5528e46d-dc23-441b-a2fd-79425d423861 Timestamp: 2025-12-29 08:52:36Z - Correlation ID: 5528e46d-dc23-441b-a2fd-79425d423861 - Trace ID: 9a45406e-c59f-46d6-a289-4a93e710c900
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)