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-05-14 12:46:22Z]: 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: 1208e503-600b-4315-9ed9-296551ee1300 Correlation ID: 407c6f67-964e-486f-b3c4-2cb99b9964af Timestamp: 2026-05-14 12:46:22Z - Correlation ID: 407c6f67-964e-486f-b3c4-2cb99b9964af - Trace ID: 1208e503-600b-4315-9ed9-296551ee1300
(node:2864) [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-05-14 12:46:22Z]: 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: 55156cfd-601d-4a1d-a835-1a8864812a00 Correlation ID: 2eb88dfc-5dbd-495d-a741-5b46ec43ff54 Timestamp: 2026-05-14 12:46:22Z - Correlation ID: 2eb88dfc-5dbd-495d-a741-5b46ec43ff54 - Trace ID: 55156cfd-601d-4a1d-a835-1a8864812a00
Error getting the secret: invalid_client: 7000222 - [2026-05-14 12:46:22Z]: 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: cd999ed5-98f2-4bd9-95d4-0099b1040300 Correlation ID: edbeb460-2515-4017-b3a9-d9f42e3ee912 Timestamp: 2026-05-14 12:46:22Z - Correlation ID: edbeb460-2515-4017-b3a9-d9f42e3ee912 - Trace ID: cd999ed5-98f2-4bd9-95d4-0099b1040300
Error getting the secret: invalid_client: 7000222 - [2026-05-14 12:46:22Z]: 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: ab65cca3-485a-4c0b-af74-840e15a20300 Correlation ID: f39c00fc-a379-445f-a1bb-ed1eaa764f3e Timestamp: 2026-05-14 12:46:22Z - Correlation ID: f39c00fc-a379-445f-a1bb-ed1eaa764f3e - Trace ID: ab65cca3-485a-4c0b-af74-840e15a20300
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)