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-11-26 10:39:21Z]: 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: 05af4ad1-a9fd-4600-9a1d-80c2435a7300 Correlation ID: ec817196-e40f-4315-aef3-dfd744d5775a Timestamp: 2026-11-26 10:39:21Z - Correlation ID: ec817196-e40f-4315-aef3-dfd744d5775a - Trace ID: 05af4ad1-a9fd-4600-9a1d-80c2435a7300
(node:1684) [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-11-26 10:39:21Z]: 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: 4eb02626-64c5-4038-bd18-b97b95a67400 Correlation ID: 3fcfa9aa-1b7a-4174-a6d8-c833f824ecb7 Timestamp: 2026-11-26 10:39:21Z - Correlation ID: 3fcfa9aa-1b7a-4174-a6d8-c833f824ecb7 - Trace ID: 4eb02626-64c5-4038-bd18-b97b95a67400
Error getting the secret: invalid_client: 7000222 - [2026-11-26 10:39:21Z]: 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: f17be0a9-8662-4d96-81a2-c1d5937c7a00 Correlation ID: 6a39322e-3a0e-4eeb-9351-482ea3f86bfc Timestamp: 2026-11-26 10:39:21Z - Correlation ID: 6a39322e-3a0e-4eeb-9351-482ea3f86bfc - Trace ID: f17be0a9-8662-4d96-81a2-c1d5937c7a00
Error getting the secret: invalid_client: 7000222 - [2026-11-26 10:39:21Z]: 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: b622a431-6d03-4de1-93e3-5315fd2f7600 Correlation ID: a8e415b2-3078-4274-b190-be07fbedf0cc Timestamp: 2026-11-26 10:39:21Z - Correlation ID: a8e415b2-3078-4274-b190-be07fbedf0cc - Trace ID: b622a431-6d03-4de1-93e3-5315fd2f7600
Error getting the secret: invalid_client: 7000222 - [2026-11-26 10:39:22Z]: 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: f17be0a9-8662-4d96-81a2-c1d5a27c7a00 Correlation ID: f1b3a24a-11f7-419f-a520-2ffeec9d246e Timestamp: 2026-11-26 10:39:22Z - Correlation ID: f1b3a24a-11f7-419f-a520-2ffeec9d246e - Trace ID: f17be0a9-8662-4d96-81a2-c1d5a27c7a00
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)