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-10 13:29:24Z]: 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: ef9ebbfe-3138-479b-833c-22a7d5420d00 Correlation ID: 2d0e666a-e6e6-46e9-9947-0f1bb0d8c53c Timestamp: 2026-07-10 13:29:24Z - Correlation ID: 2d0e666a-e6e6-46e9-9947-0f1bb0d8c53c - Trace ID: ef9ebbfe-3138-479b-833c-22a7d5420d00
(node:4124) [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-10 13:29: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: 64da8d3b-34f9-495a-994d-2b7969eea300 Correlation ID: 12193930-e8ec-4398-80ac-15dbd9eb68bb Timestamp: 2026-07-10 13:29:25Z - Correlation ID: 12193930-e8ec-4398-80ac-15dbd9eb68bb - Trace ID: 64da8d3b-34f9-495a-994d-2b7969eea300
Error getting the secret: invalid_client: 7000222 - [2026-07-10 13:29: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: 978e97f7-ecb9-4c48-b68b-212db8ce6f00 Correlation ID: b949cac7-2d1a-404c-8b24-51aa8046e020 Timestamp: 2026-07-10 13:29:25Z - Correlation ID: b949cac7-2d1a-404c-8b24-51aa8046e020 - Trace ID: 978e97f7-ecb9-4c48-b68b-212db8ce6f00
Error getting the secret: invalid_client: 7000222 - [2026-07-10 13:29: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: 58b20c7e-ffda-48d7-9bbb-846985f60e00 Correlation ID: 454a866e-f43b-4ea0-a414-415adc64f9d8 Timestamp: 2026-07-10 13:29:25Z - Correlation ID: 454a866e-f43b-4ea0-a414-415adc64f9d8 - Trace ID: 58b20c7e-ffda-48d7-9bbb-846985f60e00
Error getting the secret: invalid_client: 7000222 - [2026-07-10 13:29: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: 66517e79-892a-4c43-8842-175994e51100 Correlation ID: e91fad78-a372-4d5c-9d73-e66951fdc763 Timestamp: 2026-07-10 13:29:25Z - Correlation ID: e91fad78-a372-4d5c-9d73-e66951fdc763 - Trace ID: 66517e79-892a-4c43-8842-175994e51100
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)