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-27 07:50: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: 691d2f96-e5aa-498f-94a6-4957793b4f00 Correlation ID: 95527e05-5c37-4731-8285-4439cb5e2c09 Timestamp: 2025-12-27 07:50:53Z - Correlation ID: 95527e05-5c37-4731-8285-4439cb5e2c09 - Trace ID: 691d2f96-e5aa-498f-94a6-4957793b4f00
(node:5428) [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-27 07:50: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: 46f9a9f7-b5c1-4a07-8c42-86fd2d06d900 Correlation ID: be57129a-ca58-43f6-97ce-27faf816edfc Timestamp: 2025-12-27 07:50:53Z - Correlation ID: be57129a-ca58-43f6-97ce-27faf816edfc - Trace ID: 46f9a9f7-b5c1-4a07-8c42-86fd2d06d900
Error getting the secret: invalid_client: 7000222 - [2025-12-27 07:50: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: ce833ece-38a7-42ce-b9a8-72027c948500 Correlation ID: 60e20572-93c7-42c2-b4a6-f7a41abdc8ab Timestamp: 2025-12-27 07:50:53Z - Correlation ID: 60e20572-93c7-42c2-b4a6-f7a41abdc8ab - Trace ID: ce833ece-38a7-42ce-b9a8-72027c948500
Error getting the secret: invalid_client: 7000222 - [2025-12-27 07:50:54Z]: 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: 819daa31-4b9e-4e8f-af33-6611dfa0ac00 Correlation ID: f5a82ed3-7feb-44c6-ae73-a5036c64f406 Timestamp: 2025-12-27 07:50:54Z - Correlation ID: f5a82ed3-7feb-44c6-ae73-a5036c64f406 - Trace ID: 819daa31-4b9e-4e8f-af33-6611dfa0ac00
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)