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-25 18:36: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: 23017e4c-dc6a-40c9-b21f-c52cbc503e00 Correlation ID: 484ad023-3e67-42e2-a7e4-e539bf18efba Timestamp: 2026-07-25 18:36:51Z - Correlation ID: 484ad023-3e67-42e2-a7e4-e539bf18efba - Trace ID: 23017e4c-dc6a-40c9-b21f-c52cbc503e00
(node:1480) [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-25 18:36: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: 58627555-5a2d-4711-9aa8-454e2cc70b00 Correlation ID: 535127dd-eac4-47b6-8fc0-4146abaeaa97 Timestamp: 2026-07-25 18:36:51Z - Correlation ID: 535127dd-eac4-47b6-8fc0-4146abaeaa97 - Trace ID: 58627555-5a2d-4711-9aa8-454e2cc70b00
Error getting the secret: invalid_client: 7000222 - [2026-07-25 18:36:52Z]: 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: 7b53f29b-d1d7-4816-a16b-699c8fb71300 Correlation ID: f52b88c8-7e98-4569-824f-8f9f6a006ef8 Timestamp: 2026-07-25 18:36:52Z - Correlation ID: f52b88c8-7e98-4569-824f-8f9f6a006ef8 - Trace ID: 7b53f29b-d1d7-4816-a16b-699c8fb71300
Error getting the secret: invalid_client: 7000222 - [2026-07-25 18:36:52Z]: 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: 23017e4c-dc6a-40c9-b21f-c52cce503e00 Correlation ID: da3e9461-c3b6-4cd7-b3a5-1ff98da03636 Timestamp: 2026-07-25 18:36:52Z - Correlation ID: da3e9461-c3b6-4cd7-b3a5-1ff98da03636 - Trace ID: 23017e4c-dc6a-40c9-b21f-c52cce503e00
Error getting the secret: invalid_client: 7000222 - [2026-07-25 18:36:53Z]: 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: a10b3e28-d53f-4bd1-92c2-0f6a8c581000 Correlation ID: 10af2b00-5b9e-4259-b8ca-12e4f17ac2f9 Timestamp: 2026-07-25 18:36:53Z - Correlation ID: 10af2b00-5b9e-4259-b8ca-12e4f17ac2f9 - Trace ID: a10b3e28-d53f-4bd1-92c2-0f6a8c581000
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)