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-25 09:02:27Z]: 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: d2e51c48-c73c-4d36-bc73-b244ddcd0c00 Correlation ID: 8384c59a-bb12-4ac8-9d58-c18c7fca20ce Timestamp: 2026-04-25 09:02:27Z - Correlation ID: 8384c59a-bb12-4ac8-9d58-c18c7fca20ce - Trace ID: d2e51c48-c73c-4d36-bc73-b244ddcd0c00
(node:3612) [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-25 09:02:28Z]: 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: ac9b0c88-a0ac-47ee-a46a-cb054cba0e00 Correlation ID: e952f9da-8dd0-47f3-aaff-2bcb5b8061ff Timestamp: 2026-04-25 09:02:28Z - Correlation ID: e952f9da-8dd0-47f3-aaff-2bcb5b8061ff - Trace ID: ac9b0c88-a0ac-47ee-a46a-cb054cba0e00
Error getting the secret: invalid_client: 7000222 - [2026-04-25 09:02:28Z]: 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: d2e51c48-c73c-4d36-bc73-b244e8cd0c00 Correlation ID: ffd9792c-3de2-4bdf-8b83-39cbfd48dc36 Timestamp: 2026-04-25 09:02:28Z - Correlation ID: ffd9792c-3de2-4bdf-8b83-39cbfd48dc36 - Trace ID: d2e51c48-c73c-4d36-bc73-b244e8cd0c00
Error getting the secret: invalid_client: 7000222 - [2026-04-25 09:02:28Z]: 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: d8084ecb-2fac-4303-86c2-22a7a7c70e00 Correlation ID: 7e0a1daa-2046-4924-ad1e-22ba7256b93b Timestamp: 2026-04-25 09:02:28Z - Correlation ID: 7e0a1daa-2046-4924-ad1e-22ba7256b93b - Trace ID: d8084ecb-2fac-4303-86c2-22a7a7c70e00
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)