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-25 10:44:11Z]: 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: 99ced9eb-7db8-45e6-a673-3ea3ee599400 Correlation ID: 9dff1ef7-ba02-4302-8299-fc8081f1c7db Timestamp: 2026-02-25 10:44:11Z - Correlation ID: 9dff1ef7-ba02-4302-8299-fc8081f1c7db - Trace ID: 99ced9eb-7db8-45e6-a673-3ea3ee599400
(node:4540) [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-25 10:44:12Z]: 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: 8dde5745-3fa2-4b03-9570-80b62b5a0200 Correlation ID: 0574c74d-6671-4faa-8e9e-b0495a702d76 Timestamp: 2026-02-25 10:44:12Z - Correlation ID: 0574c74d-6671-4faa-8e9e-b0495a702d76 - Trace ID: 8dde5745-3fa2-4b03-9570-80b62b5a0200
Error getting the secret: invalid_client: 7000222 - [2026-02-25 10:44:12Z]: 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: 27622eb2-b340-4e60-ac55-a64f8ff80b00 Correlation ID: 9441e686-98e9-457d-9f04-1e19fa276f03 Timestamp: 2026-02-25 10:44:12Z - Correlation ID: 9441e686-98e9-457d-9f04-1e19fa276f03 - Trace ID: 27622eb2-b340-4e60-ac55-a64f8ff80b00
Error getting the secret: invalid_client: 7000222 - [2026-02-25 10:44:12Z]: 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: c8eb1e73-a96d-4d2f-a688-f3eb84699c00 Correlation ID: 9714b93a-69a4-4510-af62-c6e87754c0fa Timestamp: 2026-02-25 10:44:12Z - Correlation ID: 9714b93a-69a4-4510-af62-c6e87754c0fa - Trace ID: c8eb1e73-a96d-4d2f-a688-f3eb84699c00
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)