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-05 13:24:23Z]: 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: 1425081b-b2d2-450c-a204-2428c3590400 Correlation ID: d1601307-8eb6-4e6d-83e0-479a654533bd Timestamp: 2026-04-05 13:24:23Z - Correlation ID: d1601307-8eb6-4e6d-83e0-479a654533bd - Trace ID: 1425081b-b2d2-450c-a204-2428c3590400
(node:5896) [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-05 13:24:24Z]: 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: 697918ed-3d62-4415-917a-83c1b6f02a00 Correlation ID: 5a2085a3-d6ec-40d6-a5af-405e78892dbe Timestamp: 2026-04-05 13:24:24Z - Correlation ID: 5a2085a3-d6ec-40d6-a5af-405e78892dbe - Trace ID: 697918ed-3d62-4415-917a-83c1b6f02a00
Error getting the secret: invalid_client: 7000222 - [2026-04-05 13:24:24Z]: 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: 1425081b-b2d2-450c-a204-2428c5590400 Correlation ID: c2164448-27bc-40bb-8a83-9e98563d7395 Timestamp: 2026-04-05 13:24:24Z - Correlation ID: c2164448-27bc-40bb-8a83-9e98563d7395 - Trace ID: 1425081b-b2d2-450c-a204-2428c5590400
Error getting the secret: invalid_client: 7000222 - [2026-04-05 13:24:24Z]: 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: 1425081b-b2d2-450c-a204-2428c7590400 Correlation ID: 21ee80d2-66df-43bb-8791-28de1f27b9a6 Timestamp: 2026-04-05 13:24:24Z - Correlation ID: 21ee80d2-66df-43bb-8791-28de1f27b9a6 - Trace ID: 1425081b-b2d2-450c-a204-2428c7590400
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)