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 09:12:59Z]: 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: 9870ef20-ce74-4ca8-b155-d7d05c41be00 Correlation ID: 56e54a50-18b9-44aa-bb81-53dda05c37f6 Timestamp: 2025-12-27 09:12:59Z - Correlation ID: 56e54a50-18b9-44aa-bb81-53dda05c37f6 - Trace ID: 9870ef20-ce74-4ca8-b155-d7d05c41be00
(node:4872) [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 09:12:59Z]: 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: 320bde46-9cec-47ba-87fb-6fd8281ca600 Correlation ID: 1356fa9c-2419-4614-8618-5d1d4f2a21e5 Timestamp: 2025-12-27 09:12:59Z - Correlation ID: 1356fa9c-2419-4614-8618-5d1d4f2a21e5 - Trace ID: 320bde46-9cec-47ba-87fb-6fd8281ca600
Error getting the secret: invalid_client: 7000222 - [2025-12-27 09:12:59Z]: 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: d5edae13-ffd4-4344-a0a4-bcf21d4cb100 Correlation ID: a7262eee-bdb0-462a-9f44-2003376fce50 Timestamp: 2025-12-27 09:12:59Z - Correlation ID: a7262eee-bdb0-462a-9f44-2003376fce50 - Trace ID: d5edae13-ffd4-4344-a0a4-bcf21d4cb100
Error getting the secret: invalid_client: 7000222 - [2025-12-27 09:13:00Z]: 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: a92b92e6-130e-4fc5-a3cb-5ed08b42a900 Correlation ID: 05f7e6c1-d9d0-4e4d-8d14-43ac0ec9a0e8 Timestamp: 2025-12-27 09:13:00Z - Correlation ID: 05f7e6c1-d9d0-4e4d-8d14-43ac0ec9a0e8 - Trace ID: a92b92e6-130e-4fc5-a3cb-5ed08b42a900
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)