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-10 12:17:01Z]: 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: 817508f9-d176-4d9e-a9c0-b55c263a5d00 Correlation ID: c7af467f-c69c-451d-801d-bd103c95c1dd Timestamp: 2026-04-10 12:17:01Z - Correlation ID: c7af467f-c69c-451d-801d-bd103c95c1dd - Trace ID: 817508f9-d176-4d9e-a9c0-b55c263a5d00
(node:2936) [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-10 12:17:02Z]: 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: 07ecd287-cfb2-4028-9a8e-9071d7406b00 Correlation ID: 822dfbf6-bf22-4c3d-b602-23a8e4e21a4a Timestamp: 2026-04-10 12:17:02Z - Correlation ID: 822dfbf6-bf22-4c3d-b602-23a8e4e21a4a - Trace ID: 07ecd287-cfb2-4028-9a8e-9071d7406b00
Error getting the secret: invalid_client: 7000222 - [2026-04-10 12:17:02Z]: 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: 30a388e0-6ee8-4255-8542-ed34b5400500 Correlation ID: 769fbbc9-17a3-403d-a84d-8f33b3159b87 Timestamp: 2026-04-10 12:17:02Z - Correlation ID: 769fbbc9-17a3-403d-a84d-8f33b3159b87 - Trace ID: 30a388e0-6ee8-4255-8542-ed34b5400500
Error getting the secret: invalid_client: 7000222 - [2026-04-10 12:17:03Z]: 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: 005bc4a3-b02c-4c0b-b8e3-05c7513a6100 Correlation ID: 30978e64-38db-433a-b81a-23eb9dbf5922 Timestamp: 2026-04-10 12:17:03Z - Correlation ID: 30978e64-38db-433a-b81a-23eb9dbf5922 - Trace ID: 005bc4a3-b02c-4c0b-b8e3-05c7513a6100
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)