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-04-26 16:57: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: 8d9f1582-c11e-4a44-b4ac-53182d9c4800 Correlation ID: 1719792a-ceb5-46a7-8862-28029e163550 Timestamp: 2026-04-26 16:57:43Z - Correlation ID: 1719792a-ceb5-46a7-8862-28029e163550 - Trace ID: 8d9f1582-c11e-4a44-b4ac-53182d9c4800
(node:5812) [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-04-26 16:57: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: 70c1012c-ff32-4b9a-b1f8-3a02c18e2600 Correlation ID: f7f46749-4e75-4540-9d8e-7e70cd1eb800 Timestamp: 2026-04-26 16:57:44Z - Correlation ID: f7f46749-4e75-4540-9d8e-7e70cd1eb800 - Trace ID: 70c1012c-ff32-4b9a-b1f8-3a02c18e2600
Error getting the secret: invalid_client: 7000222 - [2026-04-26 16:57: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: 5826c7c2-c843-4fe1-b6fb-685fb7094700 Correlation ID: f855c166-44a9-4103-9de3-b217875a6014 Timestamp: 2026-04-26 16:57:44Z - Correlation ID: f855c166-44a9-4103-9de3-b217875a6014 - Trace ID: 5826c7c2-c843-4fe1-b6fb-685fb7094700
Error getting the secret: invalid_client: 7000222 - [2026-04-26 16:57: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: 53b066fa-9869-4c6b-b1e3-1f501c204e00 Correlation ID: 3b776518-2583-4ab4-99ee-0e54f090b082 Timestamp: 2026-04-26 16:57:44Z - Correlation ID: 3b776518-2583-4ab4-99ee-0e54f090b082 - Trace ID: 53b066fa-9869-4c6b-b1e3-1f501c204e00
Error getting the secret: invalid_client: 7000222 - [2026-04-26 16:57: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: ade0e955-6a7c-4cdf-8b28-fbd36f962900 Correlation ID: 033ee2cf-63aa-49e6-b917-636e5a3cda3b Timestamp: 2026-04-26 16:57:44Z - Correlation ID: 033ee2cf-63aa-49e6-b917-636e5a3cda3b - Trace ID: ade0e955-6a7c-4cdf-8b28-fbd36f962900
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)