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-02-26 02:30:33Z]: 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: 2b61163a-1a0b-4cd9-8066-fc83eba0b200 Correlation ID: 125bd0d8-876d-4f6f-b969-f29629df5f77 Timestamp: 2026-02-26 02:30:33Z - Correlation ID: 125bd0d8-876d-4f6f-b969-f29629df5f77 - Trace ID: 2b61163a-1a0b-4cd9-8066-fc83eba0b200
(node:5028) [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-02-26 02:30:33Z]: 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: 10209768-6b62-4daf-bd9d-3796c1c39300 Correlation ID: 7cd38d1d-7c00-4ed0-8293-fda2967814bd Timestamp: 2026-02-26 02:30:33Z - Correlation ID: 7cd38d1d-7c00-4ed0-8293-fda2967814bd - Trace ID: 10209768-6b62-4daf-bd9d-3796c1c39300
Error getting the secret: invalid_client: 7000222 - [2026-02-26 02:30:33Z]: 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: deffdb65-7b01-441a-90d6-d20cde42a000 Correlation ID: ac92c460-5b00-477f-8aa9-5a3564f11178 Timestamp: 2026-02-26 02:30:33Z - Correlation ID: ac92c460-5b00-477f-8aa9-5a3564f11178 - Trace ID: deffdb65-7b01-441a-90d6-d20cde42a000
Error getting the secret: invalid_client: 7000222 - [2026-02-26 02:30:33Z]: 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: 2b61163a-1a0b-4cd9-8066-fc83fda0b200 Correlation ID: 7ed63c5a-54a6-49cb-a17b-5ffaf73c9d47 Timestamp: 2026-02-26 02:30:33Z - Correlation ID: 7ed63c5a-54a6-49cb-a17b-5ffaf73c9d47 - Trace ID: 2b61163a-1a0b-4cd9-8066-fc83fda0b200
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:25:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)