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-04-01 04:56:25Z]: 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: 2766c829-bdac-4406-a8a1-d0e1d7a90200 Correlation ID: 9bba61af-2980-4df6-8e2c-cff7b8e67cfd Timestamp: 2026-04-01 04:56:25Z - Correlation ID: 9bba61af-2980-4df6-8e2c-cff7b8e67cfd - Trace ID: 2766c829-bdac-4406-a8a1-d0e1d7a90200
(node:2272) [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-04-01 04:56:25Z]: 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: e56eb564-bace-4413-9f7e-6c5d94130c00 Correlation ID: 6231d269-e142-40e2-9427-de3583ec41c8 Timestamp: 2026-04-01 04:56:25Z - Correlation ID: 6231d269-e142-40e2-9427-de3583ec41c8 - Trace ID: e56eb564-bace-4413-9f7e-6c5d94130c00
Error getting the secret: invalid_client: 7000222 - [2026-04-01 04:56:26Z]: 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: dca6d538-11b3-40a9-9120-b6d1708e5600 Correlation ID: 116e485c-d277-4bd5-9e0b-89baf78d8387 Timestamp: 2026-04-01 04:56:26Z - Correlation ID: 116e485c-d277-4bd5-9e0b-89baf78d8387 - Trace ID: dca6d538-11b3-40a9-9120-b6d1708e5600
Error getting the secret: invalid_client: 7000222 - [2026-04-01 04:56:26Z]: 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: f0778e2d-a77a-49a5-8ebd-53a3dcdd0200 Correlation ID: 0c57ba02-0095-485e-bfc1-a02612b426d6 Timestamp: 2026-04-01 04:56:26Z - Correlation ID: 0c57ba02-0095-485e-bfc1-a02612b426d6 - Trace ID: f0778e2d-a77a-49a5-8ebd-53a3dcdd0200
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)