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-11-19 13:30:02Z]: 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: 76a4cab7-679f-4870-88e0-7bb5d0cb0a00 Correlation ID: 41072d62-1a1b-47b8-a0ed-bef3b2fe1778 Timestamp: 2025-11-19 13:30:02Z - Correlation ID: 41072d62-1a1b-47b8-a0ed-bef3b2fe1778 - Trace ID: 76a4cab7-679f-4870-88e0-7bb5d0cb0a00
(node:5424) [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-11-19 13:30:02Z]: 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: 667edd0c-f680-4ddd-992c-f9646c332900 Correlation ID: 254379e9-f984-4771-8adf-a5055c14dd44 Timestamp: 2025-11-19 13:30:02Z - Correlation ID: 254379e9-f984-4771-8adf-a5055c14dd44 - Trace ID: 667edd0c-f680-4ddd-992c-f9646c332900
Error getting the secret: invalid_client: 7000222 - [2025-11-19 13:30:03Z]: 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: 76cc757c-1352-4c5b-8abb-7a89341a7e00 Correlation ID: 035613c9-a2f4-46b8-abc2-f425f1492a9e Timestamp: 2025-11-19 13:30:03Z - Correlation ID: 035613c9-a2f4-46b8-abc2-f425f1492a9e - Trace ID: 76cc757c-1352-4c5b-8abb-7a89341a7e00
Error getting the secret: invalid_client: 7000222 - [2025-11-19 13:30:03Z]: 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: be76564f-aeb4-40ef-be9f-914add706e00 Correlation ID: aba79b6e-6790-40bc-9b63-1c17417aade7 Timestamp: 2025-11-19 13:30:03Z - Correlation ID: aba79b6e-6790-40bc-9b63-1c17417aade7 - Trace ID: be76564f-aeb4-40ef-be9f-914add706e00
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)