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-12 06:37:21Z]: 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: f5d8c8f8-82d8-4504-b02d-7bf4d35d1a00 Correlation ID: 2df55931-8108-40fe-a162-a0ace4955a3b Timestamp: 2026-04-12 06:37:21Z - Correlation ID: 2df55931-8108-40fe-a162-a0ace4955a3b - Trace ID: f5d8c8f8-82d8-4504-b02d-7bf4d35d1a00
(node:5336) [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-12 06:37: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: 9c0828a9-5fa5-47b0-b38e-d01c7bf91d00 Correlation ID: e2b12d22-8643-4855-91d3-47d819e035be Timestamp: 2026-04-12 06:37:22Z - Correlation ID: e2b12d22-8643-4855-91d3-47d819e035be - Trace ID: 9c0828a9-5fa5-47b0-b38e-d01c7bf91d00
Error getting the secret: invalid_client: 7000222 - [2026-04-12 06:37: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: b596c236-c9a7-4c07-808a-818883de1e00 Correlation ID: 64f2a0b0-bc0f-44d3-91ed-60e9b56e9600 Timestamp: 2026-04-12 06:37:22Z - Correlation ID: 64f2a0b0-bc0f-44d3-91ed-60e9b56e9600 - Trace ID: b596c236-c9a7-4c07-808a-818883de1e00
Error getting the secret: invalid_client: 7000222 - [2026-04-12 06:37: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: 823a70b4-9246-483d-be71-10fc6e7b0a00 Correlation ID: cf4a04b1-153e-4dbe-8516-bffb960ea42f Timestamp: 2026-04-12 06:37:22Z - Correlation ID: cf4a04b1-153e-4dbe-8516-bffb960ea42f - Trace ID: 823a70b4-9246-483d-be71-10fc6e7b0a00
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)