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-05 06:59:01Z]: 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: 9084d175-db69-46cf-9ef8-1df04b918200 Correlation ID: 5c8e9f48-e3f4-42ca-9529-456f6445ebeb Timestamp: 2026-05-05 06:59:01Z - Correlation ID: 5c8e9f48-e3f4-42ca-9529-456f6445ebeb - Trace ID: 9084d175-db69-46cf-9ef8-1df04b918200
(node:4980) [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-05 06:59:01Z]: 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: 07bfe289-611e-45b3-87c2-4c23e9330100 Correlation ID: 0633e62b-0bc4-4466-94c7-6d7500eb86d1 Timestamp: 2026-05-05 06:59:01Z - Correlation ID: 0633e62b-0bc4-4466-94c7-6d7500eb86d1 - Trace ID: 07bfe289-611e-45b3-87c2-4c23e9330100
Error getting the secret: invalid_client: 7000222 - [2026-05-05 06:59:02Z]: 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: a9ef6eec-ae0c-4e5a-b748-417fce0f1200 Correlation ID: aad01a79-ca5f-4a9a-9a47-179e8bd17179 Timestamp: 2026-05-05 06:59:02Z - Correlation ID: aad01a79-ca5f-4a9a-9a47-179e8bd17179 - Trace ID: a9ef6eec-ae0c-4e5a-b748-417fce0f1200
Error getting the secret: invalid_client: 7000222 - [2026-05-05 06:59:02Z]: 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: 09187b86-11de-47a3-b20d-0d2bebfc8100 Correlation ID: c355e3cf-880f-447e-8039-59b664b03855 Timestamp: 2026-05-05 06:59:02Z - Correlation ID: c355e3cf-880f-447e-8039-59b664b03855 - Trace ID: 09187b86-11de-47a3-b20d-0d2bebfc8100
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)