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-01-04 16:54:25Z]: 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: d4f3ddf9-6514-4083-aebf-60175eea0a01 Correlation ID: 5178ed63-79c5-4a59-8c9e-e488351b286b Timestamp: 2026-01-04 16:54:25Z - Correlation ID: 5178ed63-79c5-4a59-8c9e-e488351b286b - Trace ID: d4f3ddf9-6514-4083-aebf-60175eea0a01
(node:5992) [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-01-04 16:54:25Z]: 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: 22a5a913-c4b3-40f3-ac00-15fd699e6f00 Correlation ID: 46cd10c3-8816-4800-b9be-2079ee463df9 Timestamp: 2026-01-04 16:54:25Z - Correlation ID: 46cd10c3-8816-4800-b9be-2079ee463df9 - Trace ID: 22a5a913-c4b3-40f3-ac00-15fd699e6f00
Error getting the secret: invalid_client: 7000222 - [2026-01-04 16:54:25Z]: 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: 22a5a913-c4b3-40f3-ac00-15fd6c9e6f00 Correlation ID: e6a2c328-d22d-4124-86c4-141d5f5f3767 Timestamp: 2026-01-04 16:54:25Z - Correlation ID: e6a2c328-d22d-4124-86c4-141d5f5f3767 - Trace ID: 22a5a913-c4b3-40f3-ac00-15fd6c9e6f00
Error getting the secret: invalid_client: 7000222 - [2026-01-04 16:54:25Z]: 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: e411ae6e-ce2b-4348-b27b-f8b0df0a4401 Correlation ID: 6ad5fde1-73ff-44fe-a60c-af7a63d7afa6 Timestamp: 2026-01-04 16:54:25Z - Correlation ID: 6ad5fde1-73ff-44fe-a60c-af7a63d7afa6 - Trace ID: e411ae6e-ce2b-4348-b27b-f8b0df0a4401
Error getting the secret: invalid_client: 7000222 - [2026-01-04 16:54:25Z]: 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: 5a3121cd-d71f-4b93-a13e-ff3948345601 Correlation ID: fdca8c47-c292-4b3d-80a9-9c91fbf334ff Timestamp: 2026-01-04 16:54:25Z - Correlation ID: fdca8c47-c292-4b3d-80a9-9c91fbf334ff - Trace ID: 5a3121cd-d71f-4b93-a13e-ff3948345601
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)