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 15:53:53Z]: 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: 572c3c37-a97c-43de-bca0-b8dacf0c0900 Correlation ID: 11fcfdb6-031e-4236-8c91-b4950f5053af Timestamp: 2026-04-28 15:53:53Z - Correlation ID: 11fcfdb6-031e-4236-8c91-b4950f5053af - Trace ID: 572c3c37-a97c-43de-bca0-b8dacf0c0900
(node:6016) [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 15:53:54Z]: 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: 580506f5-2e47-4938-a9d6-39a551206a00 Correlation ID: 62a615f0-113e-462e-a06e-ce5d046cb276 Timestamp: 2026-04-28 15:53:54Z - Correlation ID: 62a615f0-113e-462e-a06e-ce5d046cb276 - Trace ID: 580506f5-2e47-4938-a9d6-39a551206a00
Error getting the secret: invalid_client: 7000222 - [2026-04-28 15:53:54Z]: 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: 305b10a9-d81a-4f7c-ad47-586f68265900 Correlation ID: 4b71a630-f840-4674-ba37-4a22ac800d13 Timestamp: 2026-04-28 15:53:54Z - Correlation ID: 4b71a630-f840-4674-ba37-4a22ac800d13 - Trace ID: 305b10a9-d81a-4f7c-ad47-586f68265900
Error getting the secret: invalid_client: 7000222 - [2026-04-28 15:53:54Z]: 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: e50674f0-5ebf-4c93-bad4-be8e5e618500 Correlation ID: f16efdca-b7f7-4be5-861e-340132fd3813 Timestamp: 2026-04-28 15:53:54Z - Correlation ID: f16efdca-b7f7-4be5-861e-340132fd3813 - Trace ID: e50674f0-5ebf-4c93-bad4-be8e5e618500
Error getting the secret: invalid_client: 7000222 - [2026-04-28 15:53:54Z]: 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: 7f7bac19-7fff-4c0a-a359-5e8bb3db5b00 Correlation ID: f8192176-8549-4bb0-96d6-cf8d5057a390 Timestamp: 2026-04-28 15:53:54Z - Correlation ID: f8192176-8549-4bb0-96d6-cf8d5057a390 - Trace ID: 7f7bac19-7fff-4c0a-a359-5e8bb3db5b00
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)