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-05-02 03:41: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: bfc3c3f5-9028-4bd0-b089-1168f50c3a00 Correlation ID: 8bd179a1-8df2-4121-a42f-4632e017665a Timestamp: 2026-05-02 03:41:31Z - Correlation ID: 8bd179a1-8df2-4121-a42f-4632e017665a - Trace ID: bfc3c3f5-9028-4bd0-b089-1168f50c3a00
(node:4300) [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-05-02 03:41: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: a261bc02-d22a-4775-9492-846689e83200 Correlation ID: 39b29c7b-5977-42b4-8a5b-8a79ea099f36 Timestamp: 2026-05-02 03:41:31Z - Correlation ID: 39b29c7b-5977-42b4-8a5b-8a79ea099f36 - Trace ID: a261bc02-d22a-4775-9492-846689e83200
Error getting the secret: invalid_client: 7000222 - [2026-05-02 03:41: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: bfc3c3f5-9028-4bd0-b089-1168060d3a00 Correlation ID: 25868d9d-b1d8-48a3-8af1-9712f9cd4d08 Timestamp: 2026-05-02 03:41:32Z - Correlation ID: 25868d9d-b1d8-48a3-8af1-9712f9cd4d08 - Trace ID: bfc3c3f5-9028-4bd0-b089-1168060d3a00
Error getting the secret: invalid_client: 7000222 - [2026-05-02 03:41: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: f877a911-82be-4323-9049-777241943500 Correlation ID: 6817daf3-20a4-4667-a8a2-faa13cef4b09 Timestamp: 2026-05-02 03:41:32Z - Correlation ID: 6817daf3-20a4-4667-a8a2-faa13cef4b09 - Trace ID: f877a911-82be-4323-9049-777241943500
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)