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-18 22:47:48Z]: 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: 5b1260ca-3693-4b08-8e29-7d3103804400 Correlation ID: 916fa7c8-ae5c-481f-b6d5-bfe7422cf157 Timestamp: 2025-12-18 22:47:48Z - Correlation ID: 916fa7c8-ae5c-481f-b6d5-bfe7422cf157 - Trace ID: 5b1260ca-3693-4b08-8e29-7d3103804400
(node:4880) [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-18 22:47:48Z]: 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: 5b1260ca-3693-4b08-8e29-7d310f804400 Correlation ID: dd0351c9-6bfd-49d7-9f5f-9aa47ad1b383 Timestamp: 2025-12-18 22:47:48Z - Correlation ID: dd0351c9-6bfd-49d7-9f5f-9aa47ad1b383 - Trace ID: 5b1260ca-3693-4b08-8e29-7d310f804400
Error getting the secret: invalid_client: 7000222 - [2025-12-18 22:47:48Z]: 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: bfcea4fe-a6a9-499d-9313-d25c18fe4600 Correlation ID: 5686644c-1d14-4e4e-8a05-4d1c6281866f Timestamp: 2025-12-18 22:47:48Z - Correlation ID: 5686644c-1d14-4e4e-8a05-4d1c6281866f - Trace ID: bfcea4fe-a6a9-499d-9313-d25c18fe4600
Error getting the secret: invalid_client: 7000222 - [2025-12-18 22:47: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: cdd25582-2bfe-4384-ad81-8a65aa1d4b00 Correlation ID: cb42a930-e459-4ff6-b307-67cde5cb5c1a Timestamp: 2025-12-18 22:47:49Z - Correlation ID: cb42a930-e459-4ff6-b307-67cde5cb5c1a - Trace ID: cdd25582-2bfe-4384-ad81-8a65aa1d4b00
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)