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-15 22:08:37Z]: 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: 3ce23a7c-68c7-4d71-a17e-061bb3641100 Correlation ID: 300ed7fe-9ef5-4d40-acfd-7cbeffe467ac Timestamp: 2026-04-15 22:08:37Z - Correlation ID: 300ed7fe-9ef5-4d40-acfd-7cbeffe467ac - Trace ID: 3ce23a7c-68c7-4d71-a17e-061bb3641100
(node:2680) [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-15 22:08:37Z]: 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: 4fca1fe8-3c61-4ecb-aad1-992774fa2400 Correlation ID: a814a09d-593c-47c4-912c-a04a4fff4090 Timestamp: 2026-04-15 22:08:37Z - Correlation ID: a814a09d-593c-47c4-912c-a04a4fff4090 - Trace ID: 4fca1fe8-3c61-4ecb-aad1-992774fa2400
Error getting the secret: invalid_client: 7000222 - [2026-04-15 22:08:38Z]: 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: a3ee7cc6-7eb3-4056-bed3-a4f20a6e2300 Correlation ID: 400a2bbc-7eb4-4531-aa23-e4a0270e8ef9 Timestamp: 2026-04-15 22:08:38Z - Correlation ID: 400a2bbc-7eb4-4531-aa23-e4a0270e8ef9 - Trace ID: a3ee7cc6-7eb3-4056-bed3-a4f20a6e2300
Error getting the secret: invalid_client: 7000222 - [2026-04-15 22:08:38Z]: 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: 94724b05-d95c-4eb1-a097-bce40df91300 Correlation ID: 363d40b4-12e9-49c0-9808-a12ef822be99 Timestamp: 2026-04-15 22:08:38Z - Correlation ID: 363d40b4-12e9-49c0-9808-a12ef822be99 - Trace ID: 94724b05-d95c-4eb1-a097-bce40df91300
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)