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 - [2025-12-08 23:48:34Z]: 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: e4a8b271-55d6-49d0-8703-62bd94871b00 Correlation ID: d6b1b2b5-00ec-42de-9434-27afd00472be Timestamp: 2025-12-08 23:48:34Z - Correlation ID: d6b1b2b5-00ec-42de-9434-27afd00472be - Trace ID: e4a8b271-55d6-49d0-8703-62bd94871b00
(node:5428) [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 - [2025-12-08 23:48:34Z]: 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: 8b2bf414-179a-47f8-bab1-fcc36d510500 Correlation ID: a353e4ab-0eee-40d3-ad17-af6fd41eb442 Timestamp: 2025-12-08 23:48:34Z - Correlation ID: a353e4ab-0eee-40d3-ad17-af6fd41eb442 - Trace ID: 8b2bf414-179a-47f8-bab1-fcc36d510500
Error getting the secret: invalid_client: 7000222 - [2025-12-08 23:48:34Z]: 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: 0ae601d1-cf8e-4be0-b941-942138853a00 Correlation ID: e282072f-c23f-49fc-a46f-35c05a40b480 Timestamp: 2025-12-08 23:48:34Z - Correlation ID: e282072f-c23f-49fc-a46f-35c05a40b480 - Trace ID: 0ae601d1-cf8e-4be0-b941-942138853a00
Error getting the secret: invalid_client: 7000222 - [2025-12-08 23:48:34Z]: 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: 418fae8e-5bc8-460b-9c71-86f114de0500 Correlation ID: e255b337-4f7c-4325-9e18-10f3ac0cb56f Timestamp: 2025-12-08 23:48:34Z - Correlation ID: e255b337-4f7c-4325-9e18-10f3ac0cb56f - Trace ID: 418fae8e-5bc8-460b-9c71-86f114de0500
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)