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-28 23:56:40Z]: 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: 361d535c-beda-4655-9e4c-3ada0f2d7300 Correlation ID: 4a029ebc-afed-47d3-a5ea-15a30cd854dd Timestamp: 2026-04-28 23:56:40Z - Correlation ID: 4a029ebc-afed-47d3-a5ea-15a30cd854dd - Trace ID: 361d535c-beda-4655-9e4c-3ada0f2d7300
(node:3136) [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-28 23:56:41Z]: 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: 065bef63-aa8a-4888-9ea9-6ec112b96f00 Correlation ID: 6ed88b2d-a3e7-432a-8d4b-b6b221c0a96d Timestamp: 2026-04-28 23:56:41Z - Correlation ID: 6ed88b2d-a3e7-432a-8d4b-b6b221c0a96d - Trace ID: 065bef63-aa8a-4888-9ea9-6ec112b96f00
Error getting the secret: invalid_client: 7000222 - [2026-04-28 23:56:41Z]: 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: a3ebaded-6e39-4a19-a25a-cf9f7ba25c00 Correlation ID: 5937ea15-bdd6-4aef-bc60-5ba105c55bc3 Timestamp: 2026-04-28 23:56:41Z - Correlation ID: 5937ea15-bdd6-4aef-bc60-5ba105c55bc3 - Trace ID: a3ebaded-6e39-4a19-a25a-cf9f7ba25c00
Error getting the secret: invalid_client: 7000222 - [2026-04-28 23:56:42Z]: 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: 53d47bd3-27c5-4b81-b418-2b8957917000 Correlation ID: 9a5bf237-55cd-4920-8f98-726da51545c4 Timestamp: 2026-04-28 23:56:42Z - Correlation ID: 9a5bf237-55cd-4920-8f98-726da51545c4 - Trace ID: 53d47bd3-27c5-4b81-b418-2b8957917000
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)