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-03 07:40:58Z]: 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: 307c4aa7-c91a-4432-a719-2d03fa3a6e00 Correlation ID: 35afb38b-9456-4fb7-a672-987821b63388 Timestamp: 2026-03-03 07:40:58Z - Correlation ID: 35afb38b-9456-4fb7-a672-987821b63388 - Trace ID: 307c4aa7-c91a-4432-a719-2d03fa3a6e00
(node:1824) [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-03 07:40:59Z]: 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: ff960d61-025b-42e0-9cee-a8cc77488d00 Correlation ID: e41957e9-cb04-460c-8760-045801ce771c Timestamp: 2026-03-03 07:40:59Z - Correlation ID: e41957e9-cb04-460c-8760-045801ce771c - Trace ID: ff960d61-025b-42e0-9cee-a8cc77488d00
Error getting the secret: invalid_client: 7000222 - [2026-03-03 07:40:59Z]: 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: b9ea1375-5720-478a-b395-048b34802a00 Correlation ID: 0725574a-808e-4637-acdc-bb8ffcacddb8 Timestamp: 2026-03-03 07:40:59Z - Correlation ID: 0725574a-808e-4637-acdc-bb8ffcacddb8 - Trace ID: b9ea1375-5720-478a-b395-048b34802a00
Error getting the secret: invalid_client: 7000222 - [2026-03-03 07:40:59Z]: 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: eac4178e-c2dd-4d5e-b64a-588bec4f6900 Correlation ID: c982d74f-0e79-4090-8989-15e36ff3ad6a Timestamp: 2026-03-03 07:40:59Z - Correlation ID: c982d74f-0e79-4090-8989-15e36ff3ad6a - Trace ID: eac4178e-c2dd-4d5e-b64a-588bec4f6900
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)