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-03-04 20:06:50Z]: 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: ea3e607c-acdf-4c6f-9da3-96e7a2681800 Correlation ID: af327b21-6582-41ac-83d3-324e500481ed Timestamp: 2026-03-04 20:06:50Z - Correlation ID: af327b21-6582-41ac-83d3-324e500481ed - Trace ID: ea3e607c-acdf-4c6f-9da3-96e7a2681800
(node:3256) [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-03-04 20:06:50Z]: 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: adeb0b76-82aa-47b8-9387-bd98468d0c00 Correlation ID: 240756d5-2fdb-4b6c-a52b-4622cafd482a Timestamp: 2026-03-04 20:06:50Z - Correlation ID: 240756d5-2fdb-4b6c-a52b-4622cafd482a - Trace ID: adeb0b76-82aa-47b8-9387-bd98468d0c00
Error getting the secret: invalid_client: 7000222 - [2026-03-04 20:06: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: a53e3737-4d36-46a9-a69f-4abb535db800 Correlation ID: 4d052a33-fba0-4813-9c71-a973da0c057a Timestamp: 2026-03-04 20:06:51Z - Correlation ID: 4d052a33-fba0-4813-9c71-a973da0c057a - Trace ID: a53e3737-4d36-46a9-a69f-4abb535db800
Error getting the secret: invalid_client: 7000222 - [2026-03-04 20:06: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: a211cb99-b2ce-42f0-94a0-8b2c7c404000 Correlation ID: 0167875c-05f6-4a83-a8e5-34938c33aa28 Timestamp: 2026-03-04 20:06:51Z - Correlation ID: 0167875c-05f6-4a83-a8e5-34938c33aa28 - Trace ID: a211cb99-b2ce-42f0-94a0-8b2c7c404000
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)