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-01 17:07:47Z]: 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: c311a609-5928-46b0-8303-8bc5aa891b00 Correlation ID: 5275f059-b36e-4248-ad43-7a3e947747b9 Timestamp: 2026-05-01 17:07:47Z - Correlation ID: 5275f059-b36e-4248-ad43-7a3e947747b9 - Trace ID: c311a609-5928-46b0-8303-8bc5aa891b00
(node:4452) [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-01 17:07:47Z]: 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: b64f890b-3f9e-4156-9afb-904ad5880a00 Correlation ID: 0abe716b-b3a6-43f4-9d38-383181455ae6 Timestamp: 2026-05-01 17:07:47Z - Correlation ID: 0abe716b-b3a6-43f4-9d38-383181455ae6 - Trace ID: b64f890b-3f9e-4156-9afb-904ad5880a00
Error getting the secret: invalid_client: 7000222 - [2026-05-01 17:07:48Z]: 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: b64f890b-3f9e-4156-9afb-904adc880a00 Correlation ID: be03f40e-e147-40b6-ad76-c3f851792c3b Timestamp: 2026-05-01 17:07:48Z - Correlation ID: be03f40e-e147-40b6-ad76-c3f851792c3b - Trace ID: b64f890b-3f9e-4156-9afb-904adc880a00
Error getting the secret: invalid_client: 7000222 - [2026-05-01 17:07:48Z]: 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: 77ca0e3d-4baf-414e-8dba-5e57db412a00 Correlation ID: ba7a765d-bfd0-4745-abdd-036207b83d65 Timestamp: 2026-05-01 17:07:48Z - Correlation ID: ba7a765d-bfd0-4745-abdd-036207b83d65 - Trace ID: 77ca0e3d-4baf-414e-8dba-5e57db412a00
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)