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-07-05 03:37:00Z]: 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: ea6eea0d-af81-40f5-9f27-eec0a9bd0d00 Correlation ID: f539d218-8b13-46b2-9b69-1016616cb698 Timestamp: 2026-07-05 03:37:00Z - Correlation ID: f539d218-8b13-46b2-9b69-1016616cb698 - Trace ID: ea6eea0d-af81-40f5-9f27-eec0a9bd0d00
(node:1692) [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-07-05 03:37:01Z]: 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: 96f5ed8f-8449-4ddb-b759-0e4f44c81500 Correlation ID: e4942c0d-ae7f-44d1-b257-b5eaa54ae871 Timestamp: 2026-07-05 03:37:01Z - Correlation ID: e4942c0d-ae7f-44d1-b257-b5eaa54ae871 - Trace ID: 96f5ed8f-8449-4ddb-b759-0e4f44c81500
Error getting the secret: invalid_client: 7000222 - [2026-07-05 03:37:01Z]: 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: f8abb43e-1928-4070-b71b-8c34ef0f1300 Correlation ID: c92cd576-d960-46bf-8f60-73d82ef0f631 Timestamp: 2026-07-05 03:37:01Z - Correlation ID: c92cd576-d960-46bf-8f60-73d82ef0f631 - Trace ID: f8abb43e-1928-4070-b71b-8c34ef0f1300
Error getting the secret: invalid_client: 7000222 - [2026-07-05 03:37:01Z]: 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: 73c2b26e-e230-4ef5-83cf-5790a6e00600 Correlation ID: cec9bb6a-9561-4bbd-9f83-3b33308d3fb2 Timestamp: 2026-07-05 03:37:01Z - Correlation ID: cec9bb6a-9561-4bbd-9f83-3b33308d3fb2 - Trace ID: 73c2b26e-e230-4ef5-83cf-5790a6e00600
Error getting the secret: invalid_client: 7000222 - [2026-07-05 03:37:02Z]: 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: 3155e22a-43bb-4290-ba31-3676e9bd1200 Correlation ID: 66b28723-c00d-461d-a8c4-52b4e319c14c Timestamp: 2026-07-05 03:37:02Z - Correlation ID: 66b28723-c00d-461d-a8c4-52b4e319c14c - Trace ID: 3155e22a-43bb-4290-ba31-3676e9bd1200
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)