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-30 04:12:25Z]: 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: 78ac4f4c-12be-42f3-8522-a6ed8c692100 Correlation ID: d055fb81-1b51-4a2a-bcf1-4788257ab6d5 Timestamp: 2026-03-30 04:12:25Z - Correlation ID: d055fb81-1b51-4a2a-bcf1-4788257ab6d5 - Trace ID: 78ac4f4c-12be-42f3-8522-a6ed8c692100
(node:4732) [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-30 04:12:25Z]: 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: f01069ff-588d-43ad-87a6-309226d91300 Correlation ID: a479f611-320d-4a8e-b4a0-e93c34b085eb Timestamp: 2026-03-30 04:12:25Z - Correlation ID: a479f611-320d-4a8e-b4a0-e93c34b085eb - Trace ID: f01069ff-588d-43ad-87a6-309226d91300
Error getting the secret: invalid_client: 7000222 - [2026-03-30 04:12:25Z]: 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: bb6b9334-ce39-427d-8f81-9b1faee42000 Correlation ID: fe73601c-6a0d-4f88-b974-cc4544c549af Timestamp: 2026-03-30 04:12:25Z - Correlation ID: fe73601c-6a0d-4f88-b974-cc4544c549af - Trace ID: bb6b9334-ce39-427d-8f81-9b1faee42000
Error getting the secret: invalid_client: 7000222 - [2026-03-30 04:12:26Z]: 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: 1278227e-1444-40a2-abde-c310aa821d00 Correlation ID: 78826b91-7c2d-4da8-b474-8b4b7785a9d0 Timestamp: 2026-03-30 04:12:26Z - Correlation ID: 78826b91-7c2d-4da8-b474-8b4b7785a9d0 - Trace ID: 1278227e-1444-40a2-abde-c310aa821d00
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)