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-05-15 13:34:27Z]: 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: 6e8e535f-931e-4718-b156-e64d84260400 Correlation ID: a6b69489-8c69-4ef6-9214-2cb15d241592 Timestamp: 2026-05-15 13:34:27Z - Correlation ID: a6b69489-8c69-4ef6-9214-2cb15d241592 - Trace ID: 6e8e535f-931e-4718-b156-e64d84260400
(node:4448) [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-05-15 13:34:27Z]: 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: b62543f2-ad58-4f70-8c9d-114ba0c20500 Correlation ID: 4876a2d5-5554-4b7f-aee4-6b93471177bf Timestamp: 2026-05-15 13:34:27Z - Correlation ID: 4876a2d5-5554-4b7f-aee4-6b93471177bf - Trace ID: b62543f2-ad58-4f70-8c9d-114ba0c20500
Error getting the secret: invalid_client: 7000222 - [2026-05-15 13:34:27Z]: 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: ed52c64f-b08c-4459-8ecd-cebf96830200 Correlation ID: c95c0db9-3dc7-41fe-9159-f54ef13be4ef Timestamp: 2026-05-15 13:34:27Z - Correlation ID: c95c0db9-3dc7-41fe-9159-f54ef13be4ef - Trace ID: ed52c64f-b08c-4459-8ecd-cebf96830200
Error getting the secret: invalid_client: 7000222 - [2026-05-15 13:34:28Z]: 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: 4fcb0e67-3fad-4a7f-84a0-2af5a6112300 Correlation ID: 76b68ecd-3f01-42c3-85d1-a01b81284d09 Timestamp: 2026-05-15 13:34:28Z - Correlation ID: 76b68ecd-3f01-42c3-85d1-a01b81284d09 - Trace ID: 4fcb0e67-3fad-4a7f-84a0-2af5a6112300
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)