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 - [2025-12-06 09:51: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: 0b4f5652-e24d-484b-92eb-8e2e0f311f00 Correlation ID: e145de40-9053-4ce4-8e3a-b02b79da2f98 Timestamp: 2025-12-06 09:51:41Z - Correlation ID: e145de40-9053-4ce4-8e3a-b02b79da2f98 - Trace ID: 0b4f5652-e24d-484b-92eb-8e2e0f311f00
(node:192) [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 - [2025-12-06 09:51: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: 5c09a488-5ec2-4717-8b68-bbc4ee751a00 Correlation ID: c30e7edf-4f30-401f-8494-c1da63ac53bd Timestamp: 2025-12-06 09:51:41Z - Correlation ID: c30e7edf-4f30-401f-8494-c1da63ac53bd - Trace ID: 5c09a488-5ec2-4717-8b68-bbc4ee751a00
Error getting the secret: invalid_client: 7000222 - [2025-12-06 09:51: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: ee057f10-921a-4b05-b52e-ed0cda092300 Correlation ID: 4fcec811-8d17-41bd-bace-451f5e43569e Timestamp: 2025-12-06 09:51:41Z - Correlation ID: 4fcec811-8d17-41bd-bace-451f5e43569e - Trace ID: ee057f10-921a-4b05-b52e-ed0cda092300
Error getting the secret: invalid_client: 7000222 - [2025-12-06 09:51: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: 5c09a488-5ec2-4717-8b68-bbc4f8751a00 Correlation ID: 19854420-4a89-4a92-9a5e-549f042ed6c1 Timestamp: 2025-12-06 09:51:42Z - Correlation ID: 19854420-4a89-4a92-9a5e-549f042ed6c1 - Trace ID: 5c09a488-5ec2-4717-8b68-bbc4f8751a00
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)