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-17 01:21:49Z]: 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: 97cb2c9f-e333-463e-b6c5-90da628c0000 Correlation ID: 653d036d-21f0-4ebf-9a2e-04b6ebe4ed0f Timestamp: 2026-03-17 01:21:49Z - Correlation ID: 653d036d-21f0-4ebf-9a2e-04b6ebe4ed0f - Trace ID: 97cb2c9f-e333-463e-b6c5-90da628c0000
(node:5920) [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-17 01:21:49Z]: 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: aa43c266-efe5-46dd-9ed4-1d8dae790000 Correlation ID: 3104ddf2-be0c-43ff-baeb-9cb9a0df581e Timestamp: 2026-03-17 01:21:49Z - Correlation ID: 3104ddf2-be0c-43ff-baeb-9cb9a0df581e - Trace ID: aa43c266-efe5-46dd-9ed4-1d8dae790000
Error getting the secret: invalid_client: 7000222 - [2026-03-17 01:21:49Z]: 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: f98b0c04-0f1e-4363-a05a-47d0e74b0100 Correlation ID: 21a63e32-44fa-42fa-a745-d40a8bc006c0 Timestamp: 2026-03-17 01:21:49Z - Correlation ID: 21a63e32-44fa-42fa-a745-d40a8bc006c0 - Trace ID: f98b0c04-0f1e-4363-a05a-47d0e74b0100
Error getting the secret: invalid_client: 7000222 - [2026-03-17 01:21:49Z]: 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: 77c37bdb-d927-4589-a598-32da7f6f5100 Correlation ID: 3a724d0e-0e4e-452c-bd64-9d6455c74b96 Timestamp: 2026-03-17 01:21:49Z - Correlation ID: 3a724d0e-0e4e-452c-bd64-9d6455c74b96 - Trace ID: 77c37bdb-d927-4589-a598-32da7f6f5100
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)