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-03-21 22:20:34Z]: 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: 1cc00a71-9d1a-428b-803d-41dc31ac0b00 Correlation ID: 8f969f38-6c68-4341-80ae-79a16441cfbc Timestamp: 2026-03-21 22:20:34Z - Correlation ID: 8f969f38-6c68-4341-80ae-79a16441cfbc - Trace ID: 1cc00a71-9d1a-428b-803d-41dc31ac0b00
(node:3216) [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-03-21 22:20: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: 0e8d7c0f-053a-4780-962b-710d66150e00 Correlation ID: e2a43a9a-63b4-4d87-ba1e-a95f0c81fe63 Timestamp: 2026-03-21 22:20:35Z - Correlation ID: e2a43a9a-63b4-4d87-ba1e-a95f0c81fe63 - Trace ID: 0e8d7c0f-053a-4780-962b-710d66150e00
Error getting the secret: invalid_client: 7000222 - [2026-03-21 22:20: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: 8a77fb21-0db3-494b-aafc-1cdaaf6d0e00 Correlation ID: e537c1af-c331-41df-b697-9a2c7e3da954 Timestamp: 2026-03-21 22:20:35Z - Correlation ID: e537c1af-c331-41df-b697-9a2c7e3da954 - Trace ID: 8a77fb21-0db3-494b-aafc-1cdaaf6d0e00
Error getting the secret: invalid_client: 7000222 - [2026-03-21 22:20: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: be8b8af5-aa06-48b1-aa72-ca42f65b0d00 Correlation ID: d6a5a478-0b2c-4763-8b41-47a3d308a45c Timestamp: 2026-03-21 22:20:35Z - Correlation ID: d6a5a478-0b2c-4763-8b41-47a3d308a45c - Trace ID: be8b8af5-aa06-48b1-aa72-ca42f65b0d00
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)