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-06 19:33:09Z]: 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: fdcbdadd-a9a4-4509-85e5-afd13df90300 Correlation ID: 4cbf1e9d-8777-4d34-8d2c-30a55e4f0975 Timestamp: 2026-04-06 19:33:09Z - Correlation ID: 4cbf1e9d-8777-4d34-8d2c-30a55e4f0975 - Trace ID: fdcbdadd-a9a4-4509-85e5-afd13df90300
(node:4492) [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-06 19:33:09Z]: 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: 6461ff32-d54e-4e7d-8162-6d680a614a00 Correlation ID: f0b214be-ca63-4a49-9840-c21c266ff04d Timestamp: 2026-04-06 19:33:09Z - Correlation ID: f0b214be-ca63-4a49-9840-c21c266ff04d - Trace ID: 6461ff32-d54e-4e7d-8162-6d680a614a00
Error getting the secret: invalid_client: 7000222 - [2026-04-06 19:33:09Z]: 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: 15c281b1-c049-4e50-8f10-af33cb3a0b00 Correlation ID: 98b91ab6-6661-408b-9c9a-43c579fa4ef6 Timestamp: 2026-04-06 19:33:09Z - Correlation ID: 98b91ab6-6661-408b-9c9a-43c579fa4ef6 - Trace ID: 15c281b1-c049-4e50-8f10-af33cb3a0b00
Error getting the secret: invalid_client: 7000222 - [2026-04-06 19:33:09Z]: 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: 6b8a869c-8cdf-43e4-bf97-8190dacf4100 Correlation ID: 88a6e16a-63ad-44cd-a2a0-bc2cc074e9ae Timestamp: 2026-04-06 19:33:09Z - Correlation ID: 88a6e16a-63ad-44cd-a2a0-bc2cc074e9ae - Trace ID: 6b8a869c-8cdf-43e4-bf97-8190dacf4100
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)