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-01 00:12:51Z]: 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: 25557567-f4eb-4473-97b9-8a01766a1400 Correlation ID: b106ba1f-848c-4b25-ab3e-33061fc7b4cd Timestamp: 2026-05-01 00:12:51Z - Correlation ID: b106ba1f-848c-4b25-ab3e-33061fc7b4cd - Trace ID: 25557567-f4eb-4473-97b9-8a01766a1400
(node:4204) [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-01 00:12:51Z]: 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: 68e590bd-cbb7-41a7-9bd6-0aec6c4b1400 Correlation ID: 5977b071-25b5-4adc-8dc1-dc2db05cb57a Timestamp: 2026-05-01 00:12:51Z - Correlation ID: 5977b071-25b5-4adc-8dc1-dc2db05cb57a - Trace ID: 68e590bd-cbb7-41a7-9bd6-0aec6c4b1400
Error getting the secret: invalid_client: 7000222 - [2026-05-01 00:12:51Z]: 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: b2eb20d3-7521-44b8-a61f-a9fec42f0b00 Correlation ID: 139e106b-1504-45ec-82ea-b9779f9366f7 Timestamp: 2026-05-01 00:12:51Z - Correlation ID: 139e106b-1504-45ec-82ea-b9779f9366f7 - Trace ID: b2eb20d3-7521-44b8-a61f-a9fec42f0b00
Error getting the secret: invalid_client: 7000222 - [2026-05-01 00:12:52Z]: 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: 00f345db-2456-422c-87d8-b6ab377f1200 Correlation ID: 85fb334c-c020-483b-80e9-9e580f499372 Timestamp: 2026-05-01 00:12:52Z - Correlation ID: 85fb334c-c020-483b-80e9-9e580f499372 - Trace ID: 00f345db-2456-422c-87d8-b6ab377f1200
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)