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 - [2025-11-22 00:13: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: 3e76a18b-d8d3-474a-b8b6-c918d2a92800 Correlation ID: b3efdd77-d513-44f0-bb0c-0a9bf61a1134 Timestamp: 2025-11-22 00:13:02Z - Correlation ID: b3efdd77-d513-44f0-bb0c-0a9bf61a1134 - Trace ID: 3e76a18b-d8d3-474a-b8b6-c918d2a92800
(node:2188) [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 - [2025-11-22 00:13: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: 674196ac-8c86-4058-8415-ac783a5d2600 Correlation ID: aaf1476f-0b28-47a2-90be-b332d4fdcb66 Timestamp: 2025-11-22 00:13:03Z - Correlation ID: aaf1476f-0b28-47a2-90be-b332d4fdcb66 - Trace ID: 674196ac-8c86-4058-8415-ac783a5d2600
Error getting the secret: invalid_client: 7000222 - [2025-11-22 00:13: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: a0efd2b7-0a79-418b-b150-762f7de61f00 Correlation ID: 9dd0c9c9-6811-4ddb-9804-6c78be67529b Timestamp: 2025-11-22 00:13:03Z - Correlation ID: 9dd0c9c9-6811-4ddb-9804-6c78be67529b - Trace ID: a0efd2b7-0a79-418b-b150-762f7de61f00
Error getting the secret: invalid_client: 7000222 - [2025-11-22 00:13: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: 91c21f55-7647-4dee-85f4-b020bf781700 Correlation ID: 89a883ca-4dd4-4fb3-91fe-7c08d8254557 Timestamp: 2025-11-22 00:13:03Z - Correlation ID: 89a883ca-4dd4-4fb3-91fe-7c08d8254557 - Trace ID: 91c21f55-7647-4dee-85f4-b020bf781700
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)