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-19 21:55: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: c9d5491f-864e-45d7-980a-bcc8967d4500 Correlation ID: 5fc1ab6e-794e-4a4f-a6a5-881357a6bc51 Timestamp: 2026-03-19 21:55:36Z - Correlation ID: 5fc1ab6e-794e-4a4f-a6a5-881357a6bc51 - Trace ID: c9d5491f-864e-45d7-980a-bcc8967d4500
(node:2772) [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-19 21:55: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: 23cdd159-f2f1-4972-94e0-ec79676b3500 Correlation ID: c362401e-bc5c-4ad2-89fd-4502a97c48b4 Timestamp: 2026-03-19 21:55:36Z - Correlation ID: c362401e-bc5c-4ad2-89fd-4502a97c48b4 - Trace ID: 23cdd159-f2f1-4972-94e0-ec79676b3500
Error getting the secret: invalid_client: 7000222 - [2026-03-19 21:55: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: 9ee1061a-5a54-4447-be57-331a592a3900 Correlation ID: be3b1ba1-fb94-4aaf-908c-4a7780862c8e Timestamp: 2026-03-19 21:55:36Z - Correlation ID: be3b1ba1-fb94-4aaf-908c-4a7780862c8e - Trace ID: 9ee1061a-5a54-4447-be57-331a592a3900
Error getting the secret: invalid_client: 7000222 - [2026-03-19 21:55: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: b78fb1f5-5b65-4e41-9aa4-d1f83b473700 Correlation ID: d2c88568-aa97-4d12-80bf-d686ae90a67f Timestamp: 2026-03-19 21:55:37Z - Correlation ID: d2c88568-aa97-4d12-80bf-d686ae90a67f - Trace ID: b78fb1f5-5b65-4e41-9aa4-d1f83b473700
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)