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-28 05:18:04Z]: 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: 8312feee-f57d-4552-b26d-5190ede96d00 Correlation ID: d0d9e533-3997-41ab-ab0a-1f81a96b81e9 Timestamp: 2026-04-28 05:18:04Z - Correlation ID: d0d9e533-3997-41ab-ab0a-1f81a96b81e9 - Trace ID: 8312feee-f57d-4552-b26d-5190ede96d00
(node:5556) [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-28 05:18:04Z]: 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: 5e7411c0-df27-46ed-96a0-a94abb754e00 Correlation ID: 089a874f-5a29-4697-a137-c638988ba0c7 Timestamp: 2026-04-28 05:18:04Z - Correlation ID: 089a874f-5a29-4697-a137-c638988ba0c7 - Trace ID: 5e7411c0-df27-46ed-96a0-a94abb754e00
Error getting the secret: invalid_client: 7000222 - [2026-04-28 05:18:05Z]: 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: 8312feee-f57d-4552-b26d-5190fae96d00 Correlation ID: 4e0bec66-81ab-41c4-9519-b748efaef747 Timestamp: 2026-04-28 05:18:05Z - Correlation ID: 4e0bec66-81ab-41c4-9519-b748efaef747 - Trace ID: 8312feee-f57d-4552-b26d-5190fae96d00
Error getting the secret: invalid_client: 7000222 - [2026-04-28 05:18:05Z]: 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: 09556aad-6018-4774-a5e5-540993844c00 Correlation ID: 465021c8-1d0a-4b7d-a81b-3d6e621c8867 Timestamp: 2026-04-28 05:18:05Z - Correlation ID: 465021c8-1d0a-4b7d-a81b-3d6e621c8867 - Trace ID: 09556aad-6018-4774-a5e5-540993844c00
Error getting the secret: invalid_client: 7000222 - [2026-04-28 05:18:06Z]: 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: f0fbabbe-821b-4413-aaee-e30005c77200 Correlation ID: c727339e-c31d-4071-bd73-fee3c9aa0a1b Timestamp: 2026-04-28 05:18:06Z - Correlation ID: c727339e-c31d-4071-bd73-fee3c9aa0a1b - Trace ID: f0fbabbe-821b-4413-aaee-e30005c77200
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)