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-07-23 06:36:28Z]: 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: 0c6fbac2-249c-4a88-acaf-e9d89e783b00 Correlation ID: 76906dd2-8735-40f8-b28d-ca6d7b848dc0 Timestamp: 2026-07-23 06:36:28Z - Correlation ID: 76906dd2-8735-40f8-b28d-ca6d7b848dc0 - Trace ID: 0c6fbac2-249c-4a88-acaf-e9d89e783b00
(node:4428) [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-07-23 06:36:29Z]: 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: 38135cb3-a251-4a36-af42-29eab2723c00 Correlation ID: ee718256-ff43-4a6e-a1f6-eb17440cb2c0 Timestamp: 2026-07-23 06:36:29Z - Correlation ID: ee718256-ff43-4a6e-a1f6-eb17440cb2c0 - Trace ID: 38135cb3-a251-4a36-af42-29eab2723c00
Error getting the secret: invalid_client: 7000222 - [2026-07-23 06:36:29Z]: 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: d6777c27-9cab-466d-9841-76dc76673d00 Correlation ID: 9ce0f79d-ff38-497f-b0eb-8683b6fd7fa9 Timestamp: 2026-07-23 06:36:29Z - Correlation ID: 9ce0f79d-ff38-497f-b0eb-8683b6fd7fa9 - Trace ID: d6777c27-9cab-466d-9841-76dc76673d00
Error getting the secret: invalid_client: 7000222 - [2026-07-23 06:36:29Z]: 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: 5bff109f-9b33-4c59-83d5-b97e16086400 Correlation ID: 7e43646a-17f3-4afb-ab9b-34c51c44ad62 Timestamp: 2026-07-23 06:36:29Z - Correlation ID: 7e43646a-17f3-4afb-ab9b-34c51c44ad62 - Trace ID: 5bff109f-9b33-4c59-83d5-b97e16086400
Error getting the secret: invalid_client: 7000222 - [2026-07-23 06:36:30Z]: 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: 1a60a1dc-7a41-4625-9e58-e8ca039d6000 Correlation ID: 1087715c-3f7f-48ed-ae14-c83ee5daed13 Timestamp: 2026-07-23 06:36:30Z - Correlation ID: 1087715c-3f7f-48ed-ae14-c83ee5daed13 - Trace ID: 1a60a1dc-7a41-4625-9e58-e8ca039d6000
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:30:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)