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-02-25 16:26:19Z]: 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: 1c7a361b-5cc7-414c-880a-02d4e6c00900 Correlation ID: 488eefe7-5fa5-47c5-bd26-831aa544f64f Timestamp: 2026-02-25 16:26:19Z - Correlation ID: 488eefe7-5fa5-47c5-bd26-831aa544f64f - Trace ID: 1c7a361b-5cc7-414c-880a-02d4e6c00900
(node:2780) [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-02-25 16:26:20Z]: 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: ee8ae42e-a264-4cb0-a53d-60416bfe0a00 Correlation ID: cc120109-7bca-4aff-b7f3-a37e19668f1f Timestamp: 2026-02-25 16:26:20Z - Correlation ID: cc120109-7bca-4aff-b7f3-a37e19668f1f - Trace ID: ee8ae42e-a264-4cb0-a53d-60416bfe0a00
Error getting the secret: invalid_client: 7000222 - [2026-02-25 16:26:20Z]: 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: e1b6c3ac-b9eb-4e4d-8e77-e6493cda9600 Correlation ID: 334218a8-ad6f-4331-a241-ac61dc231ba9 Timestamp: 2026-02-25 16:26:20Z - Correlation ID: 334218a8-ad6f-4331-a241-ac61dc231ba9 - Trace ID: e1b6c3ac-b9eb-4e4d-8e77-e6493cda9600
Error getting the secret: invalid_client: 7000222 - [2026-02-25 16:26:20Z]: 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: 9fbd3d0c-3359-44bb-8d97-ea633e079600 Correlation ID: 48fe2e7d-73f6-474c-8d2b-dcbd8a286731 Timestamp: 2026-02-25 16:26:20Z - Correlation ID: 48fe2e7d-73f6-474c-8d2b-dcbd8a286731 - Trace ID: 9fbd3d0c-3359-44bb-8d97-ea633e079600
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:25:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)