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-14 06:56:51Z]: 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: 7401eaca-1f43-4389-b7fa-9b5cfa7d2d00 Correlation ID: 25fbe6e2-83f1-4a6d-bcf8-295cf861c19b Timestamp: 2026-05-14 06:56:51Z - Correlation ID: 25fbe6e2-83f1-4a6d-bcf8-295cf861c19b - Trace ID: 7401eaca-1f43-4389-b7fa-9b5cfa7d2d00
(node:5924) [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-14 06:56:52Z]: 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: 14979208-4f98-4741-80f7-fd3f0e7d4a00 Correlation ID: 1e7a4121-3ce4-42cf-b279-a1506d19cac1 Timestamp: 2026-05-14 06:56:52Z - Correlation ID: 1e7a4121-3ce4-42cf-b279-a1506d19cac1 - Trace ID: 14979208-4f98-4741-80f7-fd3f0e7d4a00
Error getting the secret: invalid_client: 7000222 - [2026-05-14 06:56:52Z]: 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: 9ea70a43-fe67-4d74-bf5b-378fd00f6400 Correlation ID: 56896294-167a-4f99-a3ed-e8b9962e951b Timestamp: 2026-05-14 06:56:52Z - Correlation ID: 56896294-167a-4f99-a3ed-e8b9962e951b - Trace ID: 9ea70a43-fe67-4d74-bf5b-378fd00f6400
Error getting the secret: invalid_client: 7000222 - [2026-05-14 06:56:53Z]: 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: a8d9ef75-c947-48f1-ab48-13db9e1f3700 Correlation ID: ed32e96e-567f-4a85-b428-12861367f8d5 Timestamp: 2026-05-14 06:56:53Z - Correlation ID: ed32e96e-567f-4a85-b428-12861367f8d5 - Trace ID: a8d9ef75-c947-48f1-ab48-13db9e1f3700
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)