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-15 23:26:19Z]: 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: 4b1710f5-7184-4901-8c7f-983a29a81300 Correlation ID: 392ce9c7-9e1e-4adc-884d-59df23b33a65 Timestamp: 2026-05-15 23:26:19Z - Correlation ID: 392ce9c7-9e1e-4adc-884d-59df23b33a65 - Trace ID: 4b1710f5-7184-4901-8c7f-983a29a81300
(node:5796) [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-15 23:26:19Z]: 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: 76417b51-38f1-4e41-bc77-9f8b44a61000 Correlation ID: 56d7c2f5-09d7-4d6b-8695-a6e3ed00a5be Timestamp: 2026-05-15 23:26:19Z - Correlation ID: 56d7c2f5-09d7-4d6b-8695-a6e3ed00a5be - Trace ID: 76417b51-38f1-4e41-bc77-9f8b44a61000
Error getting the secret: invalid_client: 7000222 - [2026-05-15 23:26:20Z]: 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: 6b61d9a7-d415-4887-baf5-593a1d410c00 Correlation ID: 2db9b243-c743-42c4-9bc6-23cb3a8dbb50 Timestamp: 2026-05-15 23:26:20Z - Correlation ID: 2db9b243-c743-42c4-9bc6-23cb3a8dbb50 - Trace ID: 6b61d9a7-d415-4887-baf5-593a1d410c00
Error getting the secret: invalid_client: 7000222 - [2026-05-15 23:26:20Z]: 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: 52f9e07c-ca7e-4276-a47b-1c4150ad0f00 Correlation ID: d0dbc4f7-5f74-4141-83b2-34275c4779e2 Timestamp: 2026-05-15 23:26:20Z - Correlation ID: d0dbc4f7-5f74-4141-83b2-34275c4779e2 - Trace ID: 52f9e07c-ca7e-4276-a47b-1c4150ad0f00
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)