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-26 03:28:44Z]: 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: 035ce378-9678-4d57-b1d5-13807d4a4400 Correlation ID: 0e604af5-0753-4f51-a158-d5c4fac5cd2d Timestamp: 2026-04-26 03:28:44Z - Correlation ID: 0e604af5-0753-4f51-a158-d5c4fac5cd2d - Trace ID: 035ce378-9678-4d57-b1d5-13807d4a4400
(node:1092) [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-26 03:28:45Z]: 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: 4f8118f4-f755-4ed9-ac63-01704b061f00 Correlation ID: 74b8e4ac-7ebb-4b3d-9e91-3370c02cddfe Timestamp: 2026-04-26 03:28:45Z - Correlation ID: 74b8e4ac-7ebb-4b3d-9e91-3370c02cddfe - Trace ID: 4f8118f4-f755-4ed9-ac63-01704b061f00
Error getting the secret: invalid_client: 7000222 - [2026-04-26 03:28:45Z]: 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: 58673ab3-4d0a-4284-a2f7-cb9893ba1d00 Correlation ID: 58020f63-7825-462d-84b7-f92788d3faeb Timestamp: 2026-04-26 03:28:45Z - Correlation ID: 58020f63-7825-462d-84b7-f92788d3faeb - Trace ID: 58673ab3-4d0a-4284-a2f7-cb9893ba1d00
Error getting the secret: invalid_client: 7000222 - [2026-04-26 03:28:45Z]: 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: 5b8028de-37f0-4606-8888-79e947d31d00 Correlation ID: 54ad2ceb-9c64-4de1-97ab-51d30cf2547d Timestamp: 2026-04-26 03:28:45Z - Correlation ID: 54ad2ceb-9c64-4de1-97ab-51d30cf2547d - Trace ID: 5b8028de-37f0-4606-8888-79e947d31d00
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)