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-23 00:24:46Z]: 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: e8cc357f-6e64-4f68-9b05-9dc482d13c00 Correlation ID: f73b9f69-b5bf-47fb-b7e4-c2352c703b8f Timestamp: 2026-07-23 00:24:46Z - Correlation ID: f73b9f69-b5bf-47fb-b7e4-c2352c703b8f - Trace ID: e8cc357f-6e64-4f68-9b05-9dc482d13c00
(node:4452) [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-23 00:24:47Z]: 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: 949f8ca1-e695-404b-ad31-a05fbb3b3400 Correlation ID: 42b5a193-5d61-47f9-9ddf-9ef3dffb34ca Timestamp: 2026-07-23 00:24:47Z - Correlation ID: 42b5a193-5d61-47f9-9ddf-9ef3dffb34ca - Trace ID: 949f8ca1-e695-404b-ad31-a05fbb3b3400
Error getting the secret: invalid_client: 7000222 - [2026-07-23 00:24:47Z]: 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: bfffaf52-417f-46b6-8756-fce14b714d00 Correlation ID: 8e7c9136-079c-44f3-9bb6-85a745429e4b Timestamp: 2026-07-23 00:24:47Z - Correlation ID: 8e7c9136-079c-44f3-9bb6-85a745429e4b - Trace ID: bfffaf52-417f-46b6-8756-fce14b714d00
Error getting the secret: invalid_client: 7000222 - [2026-07-23 00:24:47Z]: 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: 2d845882-7eff-49d9-b323-2a60e3373900 Correlation ID: dd6aa4f0-6437-4440-902a-5211a73d9c39 Timestamp: 2026-07-23 00:24:47Z - Correlation ID: dd6aa4f0-6437-4440-902a-5211a73d9c39 - Trace ID: 2d845882-7eff-49d9-b323-2a60e3373900
Error getting the secret: invalid_client: 7000222 - [2026-07-23 00:24:48Z]: 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: bfffaf52-417f-46b6-8756-fce156714d00 Correlation ID: bf569cfe-e6d4-45d0-9457-6eeae3fa438b Timestamp: 2026-07-23 00:24:48Z - Correlation ID: bf569cfe-e6d4-45d0-9457-6eeae3fa438b - Trace ID: bfffaf52-417f-46b6-8756-fce156714d00
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)