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-26 15:32:00Z]: 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: b46c3165-aae0-4c26-8c1e-f97785292800 Correlation ID: c17ce66b-c3dd-42b6-aad3-106d15fee738 Timestamp: 2026-04-26 15:32:00Z - Correlation ID: c17ce66b-c3dd-42b6-aad3-106d15fee738 - Trace ID: b46c3165-aae0-4c26-8c1e-f97785292800
(node:504) [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-26 15:32:01Z]: 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: cd0ab408-461f-42da-90dc-0eaab82c2800 Correlation ID: 3c429b66-bddb-4b3b-82d0-a7a81cd3fee0 Timestamp: 2026-04-26 15:32:01Z - Correlation ID: 3c429b66-bddb-4b3b-82d0-a7a81cd3fee0 - Trace ID: cd0ab408-461f-42da-90dc-0eaab82c2800
Error getting the secret: invalid_client: 7000222 - [2026-04-26 15:32:01Z]: 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: f601c7b4-3645-4783-9471-73d96d912a00 Correlation ID: bf0138e1-3970-4500-9bf7-a15d10cf0b44 Timestamp: 2026-04-26 15:32:01Z - Correlation ID: bf0138e1-3970-4500-9bf7-a15d10cf0b44 - Trace ID: f601c7b4-3645-4783-9471-73d96d912a00
Error getting the secret: invalid_client: 7000222 - [2026-04-26 15:32:01Z]: 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: 6f8ffcf7-b927-4c2a-bad1-fbce48112500 Correlation ID: 281c7ab0-28a3-4a0f-8aec-772ae3f1e90e Timestamp: 2026-04-26 15:32:01Z - Correlation ID: 281c7ab0-28a3-4a0f-8aec-772ae3f1e90e - Trace ID: 6f8ffcf7-b927-4c2a-bad1-fbce48112500
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)