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-07 10:15:30Z]: 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: b32d9c91-75cf-4e20-a613-8cf1ebf60600 Correlation ID: 834348a6-c7e9-474e-9032-b7335f0bc3bc Timestamp: 2025-12-07 10:15:30Z - Correlation ID: 834348a6-c7e9-474e-9032-b7335f0bc3bc - Trace ID: b32d9c91-75cf-4e20-a613-8cf1ebf60600
(node:1764) [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-07 10:15:30Z]: 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: c708d77e-7e44-4604-8dda-374d66d10900 Correlation ID: 2d0838d7-6d5f-4f49-899f-e8409c0fb26f Timestamp: 2025-12-07 10:15:30Z - Correlation ID: 2d0838d7-6d5f-4f49-899f-e8409c0fb26f - Trace ID: c708d77e-7e44-4604-8dda-374d66d10900
Error getting the secret: invalid_client: 7000222 - [2025-12-07 10:15:30Z]: 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: c708d77e-7e44-4604-8dda-374d69d10900 Correlation ID: 93014ac3-6611-43fc-93c3-3a6c59be5bb3 Timestamp: 2025-12-07 10:15:30Z - Correlation ID: 93014ac3-6611-43fc-93c3-3a6c59be5bb3 - Trace ID: c708d77e-7e44-4604-8dda-374d69d10900
Error getting the secret: invalid_client: 7000222 - [2025-12-07 10:15:30Z]: 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: 34c8574a-b890-44d4-86ff-ed91313d0d00 Correlation ID: 6ff448bc-ed15-45b4-b910-e6c413a9debf Timestamp: 2025-12-07 10:15:30Z - Correlation ID: 6ff448bc-ed15-45b4-b910-e6c413a9debf - Trace ID: 34c8574a-b890-44d4-86ff-ed91313d0d00
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)