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 - [2025-12-27 11:05:29Z]: 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: 36ba087f-13ce-4c1e-bc68-7ad5ea5ab700 Correlation ID: 62c436ba-d614-4624-86cd-71d4c9c2f31e Timestamp: 2025-12-27 11:05:29Z - Correlation ID: 62c436ba-d614-4624-86cd-71d4c9c2f31e - Trace ID: 36ba087f-13ce-4c1e-bc68-7ad5ea5ab700
(node:4276) [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 - [2025-12-27 11:05:29Z]: 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: 46e89ffb-8309-4ad1-b66b-2e89a16caf00 Correlation ID: e0016eb7-0169-4a06-997b-374e319044f9 Timestamp: 2025-12-27 11:05:29Z - Correlation ID: e0016eb7-0169-4a06-997b-374e319044f9 - Trace ID: 46e89ffb-8309-4ad1-b66b-2e89a16caf00
Error getting the secret: invalid_client: 7000222 - [2025-12-27 11:05:29Z]: 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: 5019d3a1-a2ef-49b6-9531-2c46fe099000 Correlation ID: 447a211c-f3e6-40f2-a070-c72e0e26e226 Timestamp: 2025-12-27 11:05:29Z - Correlation ID: 447a211c-f3e6-40f2-a070-c72e0e26e226 - Trace ID: 5019d3a1-a2ef-49b6-9531-2c46fe099000
Error getting the secret: invalid_client: 7000222 - [2025-12-27 11:05:30Z]: 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: 35e21497-38a3-4551-b0b2-0b9d7aeeaa00 Correlation ID: 73364a4a-d95b-47a9-b224-6ff17d8f7276 Timestamp: 2025-12-27 11:05:30Z - Correlation ID: 73364a4a-d95b-47a9-b224-6ff17d8f7276 - Trace ID: 35e21497-38a3-4551-b0b2-0b9d7aeeaa00
Error getting the secret: invalid_client: 7000222 - [2025-12-27 11:05:30Z]: 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: 9e3836c7-893d-4183-905d-0ac503d57900 Correlation ID: 5252e881-a3e8-4713-ab8a-2e5f9f11da0f Timestamp: 2025-12-27 11:05:30Z - Correlation ID: 5252e881-a3e8-4713-ab8a-2e5f9f11da0f - Trace ID: 9e3836c7-893d-4183-905d-0ac503d57900
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)