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-19 13:39:43Z]: 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: 2edbd1b2-6a22-4080-b56e-e025a9cc1400 Correlation ID: 60a1b75b-dc23-4c46-aeba-42809e338e51 Timestamp: 2026-07-19 13:39:43Z - Correlation ID: 60a1b75b-dc23-4c46-aeba-42809e338e51 - Trace ID: 2edbd1b2-6a22-4080-b56e-e025a9cc1400
(node:3588) [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-19 13:39:44Z]: 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: 2edbd1b2-6a22-4080-b56e-e025aecc1400 Correlation ID: fb78ca11-e808-42ff-a1d4-0a8a59530b3b Timestamp: 2026-07-19 13:39:44Z - Correlation ID: fb78ca11-e808-42ff-a1d4-0a8a59530b3b - Trace ID: 2edbd1b2-6a22-4080-b56e-e025aecc1400
Error getting the secret: invalid_client: 7000222 - [2026-07-19 13:39:44Z]: 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: 2cf9e874-c825-489d-b110-eb5b07791500 Correlation ID: 96309020-47c5-463c-95ef-1cd61aa5f486 Timestamp: 2026-07-19 13:39:44Z - Correlation ID: 96309020-47c5-463c-95ef-1cd61aa5f486 - Trace ID: 2cf9e874-c825-489d-b110-eb5b07791500
Error getting the secret: invalid_client: 7000222 - [2026-07-19 13:39:44Z]: 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: 2edbd1b2-6a22-4080-b56e-e025b8cc1400 Correlation ID: 6170bba1-510b-4ff6-9125-407581ec7326 Timestamp: 2026-07-19 13:39:44Z - Correlation ID: 6170bba1-510b-4ff6-9125-407581ec7326 - Trace ID: 2edbd1b2-6a22-4080-b56e-e025b8cc1400
Error getting the secret: invalid_client: 7000222 - [2026-07-19 13:39:45Z]: 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: 2edbd1b2-6a22-4080-b56e-e025bfcc1400 Correlation ID: 4d32b090-4506-4199-9fed-ec89d5abb55a Timestamp: 2026-07-19 13:39:45Z - Correlation ID: 4d32b090-4506-4199-9fed-ec89d5abb55a - Trace ID: 2edbd1b2-6a22-4080-b56e-e025bfcc1400
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)