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-25 06:28:39Z]: 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: ca775cc9-c709-451c-9cba-3a63342d5b00 Correlation ID: d88f9af2-b634-437e-922f-366574f6dc45 Timestamp: 2026-03-25 06:28:39Z - Correlation ID: d88f9af2-b634-437e-922f-366574f6dc45 - Trace ID: ca775cc9-c709-451c-9cba-3a63342d5b00
(node:4840) [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-25 06:28:40Z]: 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: 8af2fec9-b80f-4b2e-b532-f2135fb15800 Correlation ID: fd621812-6f8d-4293-9e3b-fa9a2d589f56 Timestamp: 2026-03-25 06:28:40Z - Correlation ID: fd621812-6f8d-4293-9e3b-fa9a2d589f56 - Trace ID: 8af2fec9-b80f-4b2e-b532-f2135fb15800
Error getting the secret: invalid_client: 7000222 - [2026-03-25 06:28:40Z]: 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: 0f12f263-449c-4063-8d16-5dd2edc75d00 Correlation ID: 47366cd2-d9c9-43ba-bed0-171d2b107ad1 Timestamp: 2026-03-25 06:28:40Z - Correlation ID: 47366cd2-d9c9-43ba-bed0-171d2b107ad1 - Trace ID: 0f12f263-449c-4063-8d16-5dd2edc75d00
Error getting the secret: invalid_client: 7000222 - [2026-03-25 06:28:40Z]: 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: 58e546b5-60a3-4387-a501-08cd47115900 Correlation ID: b2025423-d59d-4e67-bb1f-6a4516ed3cf7 Timestamp: 2026-03-25 06:28:40Z - Correlation ID: b2025423-d59d-4e67-bb1f-6a4516ed3cf7 - Trace ID: 58e546b5-60a3-4387-a501-08cd47115900
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)