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-01-21 10:00:02Z]: 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: f7df195b-455e-4cc5-9223-6de342126900 Correlation ID: 94a601ba-0035-4b18-aa82-6a95ac828785 Timestamp: 2026-01-21 10:00:02Z - Correlation ID: 94a601ba-0035-4b18-aa82-6a95ac828785 - Trace ID: f7df195b-455e-4cc5-9223-6de342126900
(node:5264) [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-01-21 10:00:02Z]: 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: 0f14eef0-eca2-4fd6-b253-f41ad7137600 Correlation ID: 4009be90-3cc2-4b64-bc75-7d665a7faa6a Timestamp: 2026-01-21 10:00:02Z - Correlation ID: 4009be90-3cc2-4b64-bc75-7d665a7faa6a - Trace ID: 0f14eef0-eca2-4fd6-b253-f41ad7137600
Error getting the secret: invalid_client: 7000222 - [2026-01-21 10:00:02Z]: 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: 0761c518-b660-49b4-b80c-c1c7af7c7300 Correlation ID: 97303238-196f-4957-8376-ba0c8f5fa98d Timestamp: 2026-01-21 10:00:02Z - Correlation ID: 97303238-196f-4957-8376-ba0c8f5fa98d - Trace ID: 0761c518-b660-49b4-b80c-c1c7af7c7300
Error getting the secret: invalid_client: 7000222 - [2026-01-21 10:00: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: 3eddafdb-8a14-43bb-80b6-26c0c9296f00 Correlation ID: 9ecd5623-aedf-418e-86db-acbab4b1f26f Timestamp: 2026-01-21 10:00:03Z - Correlation ID: 9ecd5623-aedf-418e-86db-acbab4b1f26f - Trace ID: 3eddafdb-8a14-43bb-80b6-26c0c9296f00
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)