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-06 11:20:05Z]: 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: 2898575b-167f-4bc6-8786-28f0751b0100 Correlation ID: 8c23a316-2207-44cd-a5b7-a098beadc811 Timestamp: 2026-04-06 11:20:05Z - Correlation ID: 8c23a316-2207-44cd-a5b7-a098beadc811 - Trace ID: 2898575b-167f-4bc6-8786-28f0751b0100
(node:800) [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-06 11:20:05Z]: 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: d6e24436-81fc-49c1-8e0f-bbc966dd0d00 Correlation ID: 7e304213-ca85-49fb-bc15-54f4e7eac83c Timestamp: 2026-04-06 11:20:05Z - Correlation ID: 7e304213-ca85-49fb-bc15-54f4e7eac83c - Trace ID: d6e24436-81fc-49c1-8e0f-bbc966dd0d00
Error getting the secret: invalid_client: 7000222 - [2026-04-06 11:20:05Z]: 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: ee48e8e9-47ec-4849-821a-f8d16dd92b00 Correlation ID: 622cad89-5892-4d5b-8e7e-413df4455c0a Timestamp: 2026-04-06 11:20:05Z - Correlation ID: 622cad89-5892-4d5b-8e7e-413df4455c0a - Trace ID: ee48e8e9-47ec-4849-821a-f8d16dd92b00
Error getting the secret: invalid_client: 7000222 - [2026-04-06 11:20:05Z]: 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: 5ce19561-565f-4c92-a087-77ff700e2d00 Correlation ID: a8858f63-2673-4557-808d-2a285e611d1c Timestamp: 2026-04-06 11:20:05Z - Correlation ID: a8858f63-2673-4557-808d-2a285e611d1c - Trace ID: 5ce19561-565f-4c92-a087-77ff700e2d00
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)