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-05-17 05:54:31Z]: 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: 4e7b3d53-2d5b-43de-aaf8-ce811af40900 Correlation ID: 024635c2-6128-4c0b-8b3e-f230ea9fee87 Timestamp: 2026-05-17 05:54:31Z - Correlation ID: 024635c2-6128-4c0b-8b3e-f230ea9fee87 - Trace ID: 4e7b3d53-2d5b-43de-aaf8-ce811af40900
(node:1928) [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-05-17 05:54:31Z]: 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: 35484b0e-22fb-4a44-a490-7831ba352b00 Correlation ID: de2c5fcd-f4e3-40a0-9c59-e54380ba1b12 Timestamp: 2026-05-17 05:54:31Z - Correlation ID: de2c5fcd-f4e3-40a0-9c59-e54380ba1b12 - Trace ID: 35484b0e-22fb-4a44-a490-7831ba352b00
Error getting the secret: invalid_client: 7000222 - [2026-05-17 05:54:31Z]: 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: 2bd3601b-8318-4ced-a4c8-ab5a07840c00 Correlation ID: 0ae0e352-4e63-4eb0-af70-f6a0fddde992 Timestamp: 2026-05-17 05:54:31Z - Correlation ID: 0ae0e352-4e63-4eb0-af70-f6a0fddde992 - Trace ID: 2bd3601b-8318-4ced-a4c8-ab5a07840c00
Error getting the secret: invalid_client: 7000222 - [2026-05-17 05:54:32Z]: 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: 20b232ef-3e41-4e41-a30e-b5d637cb2200 Correlation ID: c40d5405-8dcb-4f66-8c4d-e1f1a94b9d17 Timestamp: 2026-05-17 05:54:32Z - Correlation ID: c40d5405-8dcb-4f66-8c4d-e1f1a94b9d17 - Trace ID: 20b232ef-3e41-4e41-a30e-b5d637cb2200
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)