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-06 03:36:15Z]: 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: a2aa07a2-cbca-48c7-b860-d528dec92700 Correlation ID: b1542d0d-580c-4197-9f34-773495cffc5c Timestamp: 2026-07-06 03:36:15Z - Correlation ID: b1542d0d-580c-4197-9f34-773495cffc5c - Trace ID: a2aa07a2-cbca-48c7-b860-d528dec92700
(node:5184) [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-06 03:36:15Z]: 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: 01e2b31c-ad66-417f-9462-783449213100 Correlation ID: accae10c-aeb5-4f90-a34f-83e5472510e6 Timestamp: 2026-07-06 03:36:15Z - Correlation ID: accae10c-aeb5-4f90-a34f-83e5472510e6 - Trace ID: 01e2b31c-ad66-417f-9462-783449213100
Error getting the secret: invalid_client: 7000222 - [2026-07-06 03:36:15Z]: 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: 1f42ebc2-9196-4d6e-a0c7-239147c82500 Correlation ID: 7df5216b-56a8-41aa-b9a1-548c8e1e9d12 Timestamp: 2026-07-06 03:36:15Z - Correlation ID: 7df5216b-56a8-41aa-b9a1-548c8e1e9d12 - Trace ID: 1f42ebc2-9196-4d6e-a0c7-239147c82500
Error getting the secret: invalid_client: 7000222 - [2026-07-06 03:36:15Z]: 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: 01e2b31c-ad66-417f-9462-783452213100 Correlation ID: 44161fec-2169-4625-9ce2-2450601a0835 Timestamp: 2026-07-06 03:36:15Z - Correlation ID: 44161fec-2169-4625-9ce2-2450601a0835 - Trace ID: 01e2b31c-ad66-417f-9462-783452213100
Error getting the secret: invalid_client: 7000222 - [2026-07-06 03:36:16Z]: 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: 34cd6be6-e136-4863-a21c-aa39d4992300 Correlation ID: 637e590c-73f6-42ff-b7a6-227fc1396f20 Timestamp: 2026-07-06 03:36:16Z - Correlation ID: 637e590c-73f6-42ff-b7a6-227fc1396f20 - Trace ID: 34cd6be6-e136-4863-a21c-aa39d4992300
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)