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 05:49: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: 42ad414d-c123-4e67-bd5d-569e17e39400 Correlation ID: 90418b69-8662-4707-9759-50f29e44f027 Timestamp: 2026-03-09 05:49:31Z - Correlation ID: 90418b69-8662-4707-9759-50f29e44f027 - Trace ID: 42ad414d-c123-4e67-bd5d-569e17e39400
(node:4140) [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 05:49: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: 0510ffb9-2a04-494f-b580-668b270a7700 Correlation ID: c6e8e143-aa11-4ec8-a731-4f57d67e3a01 Timestamp: 2026-03-09 05:49:32Z - Correlation ID: c6e8e143-aa11-4ec8-a731-4f57d67e3a01 - Trace ID: 0510ffb9-2a04-494f-b580-668b270a7700
Error getting the secret: invalid_client: 7000222 - [2026-03-09 05:49: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: 6920e11f-0159-4d26-a061-a92c975d1c01 Correlation ID: 97c42a13-97ec-4e3d-9842-697c05bfe42d Timestamp: 2026-03-09 05:49:32Z - Correlation ID: 97c42a13-97ec-4e3d-9842-697c05bfe42d - Trace ID: 6920e11f-0159-4d26-a061-a92c975d1c01
Error getting the secret: invalid_client: 7000222 - [2026-03-09 05:49: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: 85dd60b1-d028-4782-b9cb-c5ae0daead00 Correlation ID: f94525dc-9f89-4c9b-ba9a-19e4e928c44c Timestamp: 2026-03-09 05:49:32Z - Correlation ID: f94525dc-9f89-4c9b-ba9a-19e4e928c44c - Trace ID: 85dd60b1-d028-4782-b9cb-c5ae0daead00
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)