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-10-07 10:50:50Z]: 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: 5f5c68af-d609-44f3-aff8-66dc6e7a1f00 Correlation ID: 982d1d9b-50c4-4cfc-ac9b-4ef7e0a18e63 Timestamp: 2026-10-07 10:50:50Z - Correlation ID: 982d1d9b-50c4-4cfc-ac9b-4ef7e0a18e63 - Trace ID: 5f5c68af-d609-44f3-aff8-66dc6e7a1f00
(node:5952) [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-10-07 10:50:51Z]: 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: d2fa1b3d-9609-4be4-a9d4-3d390d4a1d00 Correlation ID: 1cadc3c1-d4e9-46e7-b9e1-30ff7aeef355 Timestamp: 2026-10-07 10:50:51Z - Correlation ID: 1cadc3c1-d4e9-46e7-b9e1-30ff7aeef355 - Trace ID: d2fa1b3d-9609-4be4-a9d4-3d390d4a1d00
Error getting the secret: invalid_client: 7000222 - [2026-10-07 10:50:51Z]: 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: 2a2c64eb-fe8c-4a05-84f4-6a7ea65b1c00 Correlation ID: a2d581f7-bd8d-4400-802d-d8080ab9ba62 Timestamp: 2026-10-07 10:50:51Z - Correlation ID: a2d581f7-bd8d-4400-802d-d8080ab9ba62 - Trace ID: 2a2c64eb-fe8c-4a05-84f4-6a7ea65b1c00
Error getting the secret: invalid_client: 7000222 - [2026-10-07 10:50:51Z]: 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: 5f5c68af-d609-44f3-aff8-66dc8f7a1f00 Correlation ID: de9ad087-0bac-4dd2-b8c1-c18da235d28c Timestamp: 2026-10-07 10:50:51Z - Correlation ID: de9ad087-0bac-4dd2-b8c1-c18da235d28c - Trace ID: 5f5c68af-d609-44f3-aff8-66dc8f7a1f00
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)