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-30 04:46:03Z]: 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: e8dd7350-50f0-4fc8-a39b-2395daf78500 Correlation ID: 87bbbed8-073b-4d2f-94f2-eea6c6f498a4 Timestamp: 2026-04-30 04:46:03Z - Correlation ID: 87bbbed8-073b-4d2f-94f2-eea6c6f498a4 - Trace ID: e8dd7350-50f0-4fc8-a39b-2395daf78500
(node:4952) [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-30 04:46:04Z]: 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: 0ffa05ad-4a8d-4d1d-9534-b05350339500 Correlation ID: 736df427-f07b-4e0f-9535-b480deaa1853 Timestamp: 2026-04-30 04:46:04Z - Correlation ID: 736df427-f07b-4e0f-9535-b480deaa1853 - Trace ID: 0ffa05ad-4a8d-4d1d-9534-b05350339500
Error getting the secret: invalid_client: 7000222 - [2026-04-30 04:46:04Z]: 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: e8dd7350-50f0-4fc8-a39b-2395e5f78500 Correlation ID: 978b73eb-31e5-46a2-9a6f-66c4441bebe0 Timestamp: 2026-04-30 04:46:04Z - Correlation ID: 978b73eb-31e5-46a2-9a6f-66c4441bebe0 - Trace ID: e8dd7350-50f0-4fc8-a39b-2395e5f78500
Error getting the secret: invalid_client: 7000222 - [2026-04-30 04:46:05Z]: 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: 4d87088d-2477-40ff-b6d8-2e1f11167a00 Correlation ID: ab2dee70-faac-4a75-ac00-7259b121e59d Timestamp: 2026-04-30 04:46:05Z - Correlation ID: ab2dee70-faac-4a75-ac00-7259b121e59d - Trace ID: 4d87088d-2477-40ff-b6d8-2e1f11167a00
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)