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-03 09:18:57Z]: 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: 35e814fd-e7a9-48d8-8934-7a82ce273b00 Correlation ID: 9dee06cf-a760-4df6-b5c1-7f8a12d22cf7 Timestamp: 2026-10-03 09:18:57Z - Correlation ID: 9dee06cf-a760-4df6-b5c1-7f8a12d22cf7 - Trace ID: 35e814fd-e7a9-48d8-8934-7a82ce273b00
(node:4620) [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-03 09:18:57Z]: 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: de3bc72e-305b-4ae3-9607-a6fbe0007b00 Correlation ID: c8dbec9c-9805-4357-be5d-1afa54166568 Timestamp: 2026-10-03 09:18:57Z - Correlation ID: c8dbec9c-9805-4357-be5d-1afa54166568 - Trace ID: de3bc72e-305b-4ae3-9607-a6fbe0007b00
Error getting the secret: invalid_client: 7000222 - [2026-10-03 09:18:57Z]: 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: 712f1c25-feaf-4f5b-90d7-06612535d200 Correlation ID: 8e213f6e-b3fd-4137-bc27-5178a20fab94 Timestamp: 2026-10-03 09:18:57Z - Correlation ID: 8e213f6e-b3fd-4137-bc27-5178a20fab94 - Trace ID: 712f1c25-feaf-4f5b-90d7-06612535d200
Error getting the secret: invalid_client: 7000222 - [2026-10-03 09:18:57Z]: 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: 7b6c2b9c-e0ff-4001-b947-028ec8485000 Correlation ID: 3b2705c9-99e4-408e-89d3-f835bb5d19c2 Timestamp: 2026-10-03 09:18:57Z - Correlation ID: 3b2705c9-99e4-408e-89d3-f835bb5d19c2 - Trace ID: 7b6c2b9c-e0ff-4001-b947-028ec8485000
Error getting the secret: invalid_client: 7000222 - [2026-10-03 09:18:58Z]: 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: f7c140ec-f7cc-44ca-8f2d-457f6f516900 Correlation ID: bd89d7aa-27fe-4bbd-a40b-58e389a11177 Timestamp: 2026-10-03 09:18:58Z - Correlation ID: bd89d7aa-27fe-4bbd-a40b-58e389a11177 - Trace ID: f7c140ec-f7cc-44ca-8f2d-457f6f516900
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)