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-09 03:43:53Z]: 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: 3724ea35-2ab3-42be-8a2a-33940e173500 Correlation ID: 0fdd6d4b-9554-4e97-a715-f3da87dc0234 Timestamp: 2026-04-09 03:43:53Z - Correlation ID: 0fdd6d4b-9554-4e97-a715-f3da87dc0234 - Trace ID: 3724ea35-2ab3-42be-8a2a-33940e173500
(node:3552) [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-09 03:43:53Z]: 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: 84954268-8906-4938-ba90-b11431a23a00 Correlation ID: 0037a4f8-7ea0-46d4-9b3d-cb5702ff4449 Timestamp: 2026-04-09 03:43:53Z - Correlation ID: 0037a4f8-7ea0-46d4-9b3d-cb5702ff4449 - Trace ID: 84954268-8906-4938-ba90-b11431a23a00
Error getting the secret: invalid_client: 7000222 - [2026-04-09 03:43:53Z]: 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: cc55901c-398c-446f-ae38-0d26cfa53e00 Correlation ID: 8e40d43a-3769-4ba9-83e6-640255a7132c Timestamp: 2026-04-09 03:43:53Z - Correlation ID: 8e40d43a-3769-4ba9-83e6-640255a7132c - Trace ID: cc55901c-398c-446f-ae38-0d26cfa53e00
Error getting the secret: invalid_client: 7000222 - [2026-04-09 03:43:54Z]: 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: 972cbc3d-97ca-4659-bad2-9b7fb9890600 Correlation ID: 4c2c45e3-617c-49e6-b3c6-59bb0a524924 Timestamp: 2026-04-09 03:43:54Z - Correlation ID: 4c2c45e3-617c-49e6-b3c6-59bb0a524924 - Trace ID: 972cbc3d-97ca-4659-bad2-9b7fb9890600
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)