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-09 18:11:31Z]: 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: 3dc20e4f-c46e-4bdd-951c-f470fd22c100 Correlation ID: f170fe20-9022-499c-b434-31f1096786ab Timestamp: 2026-03-09 18:11:31Z - Correlation ID: f170fe20-9022-499c-b434-31f1096786ab - Trace ID: 3dc20e4f-c46e-4bdd-951c-f470fd22c100
(node:5768) [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-09 18:11:31Z]: 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: 988930bc-2d10-406e-b464-9c44fd841301 Correlation ID: ccb27b58-0297-4e88-8f32-13584abe6107 Timestamp: 2026-03-09 18:11:31Z - Correlation ID: ccb27b58-0297-4e88-8f32-13584abe6107 - Trace ID: 988930bc-2d10-406e-b464-9c44fd841301
Error getting the secret: invalid_client: 7000222 - [2026-03-09 18:11:32Z]: 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: afeb4ae1-1f35-4132-a21e-5cc74e690b00 Correlation ID: c58c8586-2641-4a4e-833a-5388e6f6a900 Timestamp: 2026-03-09 18:11:32Z - Correlation ID: c58c8586-2641-4a4e-833a-5388e6f6a900 - Trace ID: afeb4ae1-1f35-4132-a21e-5cc74e690b00
Error getting the secret: invalid_client: 7000222 - [2026-03-09 18:11:32Z]: 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: 87fbc0aa-43af-4b1a-bc05-b0afc3458300 Correlation ID: 140c1f18-60ca-45d3-a0c1-329ea39f11e0 Timestamp: 2026-03-09 18:11:32Z - Correlation ID: 140c1f18-60ca-45d3-a0c1-329ea39f11e0 - Trace ID: 87fbc0aa-43af-4b1a-bc05-b0afc3458300
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)