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-03-24 09:53:02Z]: 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: 52496573-0165-41b6-a9b4-aa0e466e4900 Correlation ID: bb6a572f-676a-49b9-a415-71fdf880dd53 Timestamp: 2026-03-24 09:53:02Z - Correlation ID: bb6a572f-676a-49b9-a415-71fdf880dd53 - Trace ID: 52496573-0165-41b6-a9b4-aa0e466e4900
(node:3668) [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-03-24 09:53:02Z]: 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: 98f335b9-8dfe-42f8-be17-9e467cea4200 Correlation ID: c930764f-ab96-4b21-9965-e1b40212d65a Timestamp: 2026-03-24 09:53:02Z - Correlation ID: c930764f-ab96-4b21-9965-e1b40212d65a - Trace ID: 98f335b9-8dfe-42f8-be17-9e467cea4200
Error getting the secret: invalid_client: 7000222 - [2026-03-24 09:53:03Z]: 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: 8318184e-8c4e-404d-88a7-4bb803933500 Correlation ID: 50e2544b-a1f2-4487-9f55-e2099a0b6d66 Timestamp: 2026-03-24 09:53:03Z - Correlation ID: 50e2544b-a1f2-4487-9f55-e2099a0b6d66 - Trace ID: 8318184e-8c4e-404d-88a7-4bb803933500
Error getting the secret: invalid_client: 7000222 - [2026-03-24 09:53:03Z]: 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: 110bfe41-c574-4c89-a5a6-357088b50400 Correlation ID: 0a6c6321-9d9a-474a-b273-571058fafec8 Timestamp: 2026-03-24 09:53:03Z - Correlation ID: 0a6c6321-9d9a-474a-b273-571058fafec8 - Trace ID: 110bfe41-c574-4c89-a5a6-357088b50400
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)