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-01-04 01:16:55Z]: 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: 65fe1090-9cff-4857-8576-5777334e0001 Correlation ID: c6cfd1f4-02b3-4f09-97e3-42ad187e0532 Timestamp: 2026-01-04 01:16:55Z - Correlation ID: c6cfd1f4-02b3-4f09-97e3-42ad187e0532 - Trace ID: 65fe1090-9cff-4857-8576-5777334e0001
(node:4272) [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-01-04 01:16:55Z]: 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: dccd7fc6-0c18-4af3-9f1e-b3720f848100 Correlation ID: 933cbb2a-2964-4948-9f40-2b2557ad818d Timestamp: 2026-01-04 01:16:55Z - Correlation ID: 933cbb2a-2964-4948-9f40-2b2557ad818d - Trace ID: dccd7fc6-0c18-4af3-9f1e-b3720f848100
Error getting the secret: invalid_client: 7000222 - [2026-01-04 01:16:55Z]: 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: 952c80ac-116d-4a7d-9ec3-0b2fc92f2801 Correlation ID: 293012fa-a3a2-4b7a-8853-1c8dac28d22d Timestamp: 2026-01-04 01:16:55Z - Correlation ID: 293012fa-a3a2-4b7a-8853-1c8dac28d22d - Trace ID: 952c80ac-116d-4a7d-9ec3-0b2fc92f2801
Error getting the secret: invalid_client: 7000222 - [2026-01-04 01:16:56Z]: 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: face384e-f5c4-4bb6-9bdb-b61a8b077d01 Correlation ID: 6427f691-f6be-445c-88ef-5d7240b59385 Timestamp: 2026-01-04 01:16:56Z - Correlation ID: 6427f691-f6be-445c-88ef-5d7240b59385 - Trace ID: face384e-f5c4-4bb6-9bdb-b61a8b077d01
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)