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-13 21:49:38Z]: 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: b7311841-77a0-488b-9a17-fb1875cb0200 Correlation ID: f6d39d75-3ec4-4b73-9afc-cca154575917 Timestamp: 2026-05-13 21:49:38Z - Correlation ID: f6d39d75-3ec4-4b73-9afc-cca154575917 - Trace ID: b7311841-77a0-488b-9a17-fb1875cb0200
(node:2372) [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-13 21:49:38Z]: 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: 3e59d96a-8a2b-487c-93f3-1ca44efd1400 Correlation ID: 077b5012-555e-47da-9bf3-1ca398d9ce77 Timestamp: 2026-05-13 21:49:38Z - Correlation ID: 077b5012-555e-47da-9bf3-1ca398d9ce77 - Trace ID: 3e59d96a-8a2b-487c-93f3-1ca44efd1400
Error getting the secret: invalid_client: 7000222 - [2026-05-13 21:49:38Z]: 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: 014b5846-01e1-4ea7-9d21-2ab0755a0600 Correlation ID: 4d83aef1-1480-4214-878a-5a281f1317c1 Timestamp: 2026-05-13 21:49:38Z - Correlation ID: 4d83aef1-1480-4214-878a-5a281f1317c1 - Trace ID: 014b5846-01e1-4ea7-9d21-2ab0755a0600
Error getting the secret: invalid_client: 7000222 - [2026-05-13 21:49:38Z]: 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: 62894a03-0306-4ec9-becb-616dc19f2400 Correlation ID: 01b9c868-1cd2-4dcc-b405-66c09f33dbd1 Timestamp: 2026-05-13 21:49:38Z - Correlation ID: 01b9c868-1cd2-4dcc-b405-66c09f33dbd1 - Trace ID: 62894a03-0306-4ec9-becb-616dc19f2400
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)