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-01 07:57:36Z]: 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: 19a745d1-53ec-4de0-939d-152074043c00 Correlation ID: 6c8c596c-bf43-4c70-9295-8e35a255ec72 Timestamp: 2026-03-01 07:57:36Z - Correlation ID: 6c8c596c-bf43-4c70-9295-8e35a255ec72 - Trace ID: 19a745d1-53ec-4de0-939d-152074043c00
(node:5364) [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-01 07:57:36Z]: 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: 49ed71ee-df38-4688-97f5-7a9fecff0000 Correlation ID: 6ded3727-ddb1-433d-9c8f-b32e9226a13b Timestamp: 2026-03-01 07:57:36Z - Correlation ID: 6ded3727-ddb1-433d-9c8f-b32e9226a13b - Trace ID: 49ed71ee-df38-4688-97f5-7a9fecff0000
Error getting the secret: invalid_client: 7000222 - [2026-03-01 07:57:37Z]: 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: 19a745d1-53ec-4de0-939d-152079043c00 Correlation ID: 22bbd3bd-61b4-4df3-8f8f-23bd51f481ce Timestamp: 2026-03-01 07:57:37Z - Correlation ID: 22bbd3bd-61b4-4df3-8f8f-23bd51f481ce - Trace ID: 19a745d1-53ec-4de0-939d-152079043c00
Error getting the secret: invalid_client: 7000222 - [2026-03-01 07:57:37Z]: 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: 19a745d1-53ec-4de0-939d-15207c043c00 Correlation ID: 7fa38a58-3046-48b5-b3e0-1bcf8d20bc00 Timestamp: 2026-03-01 07:57:37Z - Correlation ID: 7fa38a58-3046-48b5-b3e0-1bcf8d20bc00 - Trace ID: 19a745d1-53ec-4de0-939d-15207c043c00
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)