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 12:12:58Z]: 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: ba3dca5b-998e-4b5d-80f2-550f7c910d00 Correlation ID: 8678c2ca-c12a-4920-bef0-6e8af0e9d644 Timestamp: 2026-04-25 12:12:58Z - Correlation ID: 8678c2ca-c12a-4920-bef0-6e8af0e9d644 - Trace ID: ba3dca5b-998e-4b5d-80f2-550f7c910d00
(node:3884) [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 12:12:58Z]: 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: 9ba1df70-0df5-402a-9128-e5ffd3a91000 Correlation ID: 6dc9f728-c35b-4ed5-9b5a-02af4c8d5a0c Timestamp: 2026-04-25 12:12:58Z - Correlation ID: 6dc9f728-c35b-4ed5-9b5a-02af4c8d5a0c - Trace ID: 9ba1df70-0df5-402a-9128-e5ffd3a91000
Error getting the secret: invalid_client: 7000222 - [2026-04-25 12:12:58Z]: 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: 51d33013-e9a2-4d63-a9ba-750b32051200 Correlation ID: 8b5df519-3b0e-44dd-89d8-058c9faeef97 Timestamp: 2026-04-25 12:12:58Z - Correlation ID: 8b5df519-3b0e-44dd-89d8-058c9faeef97 - Trace ID: 51d33013-e9a2-4d63-a9ba-750b32051200
Error getting the secret: invalid_client: 7000222 - [2026-04-25 12:12:59Z]: 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: 4f61b7b5-aa03-496b-a95a-35ead05f0b00 Correlation ID: ef7df031-063e-48a8-81bd-a3dfe418211f Timestamp: 2026-04-25 12:12:59Z - Correlation ID: ef7df031-063e-48a8-81bd-a3dfe418211f - Trace ID: 4f61b7b5-aa03-496b-a95a-35ead05f0b00
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)