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-07 11:34:05Z]: 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: 9ce9498a-8fcc-4def-8867-f3c358974500 Correlation ID: f9ccd203-a79d-4656-8fec-51d661714f45 Timestamp: 2026-07-07 11:34:05Z - Correlation ID: f9ccd203-a79d-4656-8fec-51d661714f45 - Trace ID: 9ce9498a-8fcc-4def-8867-f3c358974500
(node:2000) [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-07 11:34:05Z]: 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: 46cb20e3-f50e-4cb8-aa80-38c129f25200 Correlation ID: d8d1bd45-7f69-4116-8595-38a1bb87001f Timestamp: 2026-07-07 11:34:05Z - Correlation ID: d8d1bd45-7f69-4116-8595-38a1bb87001f - Trace ID: 46cb20e3-f50e-4cb8-aa80-38c129f25200
Error getting the secret: invalid_client: 7000222 - [2026-07-07 11:34:05Z]: 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: 08d3ec79-5e1d-4722-816c-f291a5a10400 Correlation ID: 6af59031-596f-4d4e-83b9-801aad77293b Timestamp: 2026-07-07 11:34:05Z - Correlation ID: 6af59031-596f-4d4e-83b9-801aad77293b - Trace ID: 08d3ec79-5e1d-4722-816c-f291a5a10400
Error getting the secret: invalid_client: 7000222 - [2026-07-07 11:34:05Z]: 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: a3acfe90-3cd2-4f0f-99ee-a707f4c74200 Correlation ID: 14c1d4a3-933e-44ab-af62-3a57bf1c8dd6 Timestamp: 2026-07-07 11:34:05Z - Correlation ID: 14c1d4a3-933e-44ab-af62-3a57bf1c8dd6 - Trace ID: a3acfe90-3cd2-4f0f-99ee-a707f4c74200
Error getting the secret: invalid_client: 7000222 - [2026-07-07 11:34:05Z]: 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: 33da8f64-19ea-4678-a0c3-93c764465100 Correlation ID: ec42bfc1-eae2-44cf-84be-eb63dacdb080 Timestamp: 2026-07-07 11:34:05Z - Correlation ID: ec42bfc1-eae2-44cf-84be-eb63dacdb080 - Trace ID: 33da8f64-19ea-4678-a0c3-93c764465100
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)