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-01-18 08:22:12Z]: 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: 81be3721-4a32-46ee-9b83-c72ac3a11c00 Correlation ID: 97ef8a85-5990-4759-825c-377076825bc9 Timestamp: 2026-01-18 08:22:12Z - Correlation ID: 97ef8a85-5990-4759-825c-377076825bc9 - Trace ID: 81be3721-4a32-46ee-9b83-c72ac3a11c00
(node:3820) [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-01-18 08:22:12Z]: 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: 056205d3-e285-4be7-87e6-9523644a3900 Correlation ID: 115ae5d4-5c89-4845-8dc8-2f6df57f0481 Timestamp: 2026-01-18 08:22:12Z - Correlation ID: 115ae5d4-5c89-4845-8dc8-2f6df57f0481 - Trace ID: 056205d3-e285-4be7-87e6-9523644a3900
Error getting the secret: invalid_client: 7000222 - [2026-01-18 08:22:13Z]: 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: 57cabd95-abdd-4b08-ad21-76ab3a111f00 Correlation ID: b68706ec-697c-4e49-b03b-31c59e8e6add Timestamp: 2026-01-18 08:22:13Z - Correlation ID: b68706ec-697c-4e49-b03b-31c59e8e6add - Trace ID: 57cabd95-abdd-4b08-ad21-76ab3a111f00
Error getting the secret: invalid_client: 7000222 - [2026-01-18 08:22:13Z]: 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: 3f20f859-3955-4179-8ab4-5a4698bf1f00 Correlation ID: 48235b6b-7c15-4e1e-9d81-37452cd3156b Timestamp: 2026-01-18 08:22:13Z - Correlation ID: 48235b6b-7c15-4e1e-9d81-37452cd3156b - Trace ID: 3f20f859-3955-4179-8ab4-5a4698bf1f00
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)