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 - [2025-12-22 04:34:53Z]: 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: 45441d32-1251-4d8e-9621-d982f15a3800 Correlation ID: 815c7dac-a15b-4f13-834b-f8a572a58acf Timestamp: 2025-12-22 04:34:53Z - Correlation ID: 815c7dac-a15b-4f13-834b-f8a572a58acf - Trace ID: 45441d32-1251-4d8e-9621-d982f15a3800
(node:5760) [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 - [2025-12-22 04:34:53Z]: 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: db1e6514-ff9d-48c9-812a-4623f8e41a00 Correlation ID: 74c61ee7-f03d-46f7-98e0-191c775d7a8a Timestamp: 2025-12-22 04:34:53Z - Correlation ID: 74c61ee7-f03d-46f7-98e0-191c775d7a8a - Trace ID: db1e6514-ff9d-48c9-812a-4623f8e41a00
Error getting the secret: invalid_client: 7000222 - [2025-12-22 04:34:53Z]: 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: f188db1d-f4dc-4b3b-9acb-e7fcbdc22f00 Correlation ID: e5e52c34-e733-4976-b2d9-89d246e099e8 Timestamp: 2025-12-22 04:34:53Z - Correlation ID: e5e52c34-e733-4976-b2d9-89d246e099e8 - Trace ID: f188db1d-f4dc-4b3b-9acb-e7fcbdc22f00
Error getting the secret: invalid_client: 7000222 - [2025-12-22 04:34:53Z]: 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: db1e6514-ff9d-48c9-812a-462308e51a00 Correlation ID: 1ae44ac9-da31-485e-bcfa-5f36638cb973 Timestamp: 2025-12-22 04:34:53Z - Correlation ID: 1ae44ac9-da31-485e-bcfa-5f36638cb973 - Trace ID: db1e6514-ff9d-48c9-812a-462308e51a00
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)