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 08:31:54Z]: 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: c94f12b9-725b-452d-91d9-9a2671a84e00 Correlation ID: db205c92-ce54-4172-94c1-e82cc6fed7a3 Timestamp: 2026-07-25 08:31:54Z - Correlation ID: db205c92-ce54-4172-94c1-e82cc6fed7a3 - Trace ID: c94f12b9-725b-452d-91d9-9a2671a84e00
(node:6120) [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 08:31:54Z]: 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: eda11df5-35e5-428a-9922-512a5ff81500 Correlation ID: 743471c6-ff52-481f-a2d7-b6d39878b17f Timestamp: 2026-07-25 08:31:54Z - Correlation ID: 743471c6-ff52-481f-a2d7-b6d39878b17f - Trace ID: eda11df5-35e5-428a-9922-512a5ff81500
Error getting the secret: invalid_client: 7000222 - [2026-07-25 08:31:54Z]: 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: b9b5dbea-00a1-4b21-a7a6-3868dfd51000 Correlation ID: 09989dd4-8ca6-44c5-846e-53ec2bc6d5d6 Timestamp: 2026-07-25 08:31:54Z - Correlation ID: 09989dd4-8ca6-44c5-846e-53ec2bc6d5d6 - Trace ID: b9b5dbea-00a1-4b21-a7a6-3868dfd51000
Error getting the secret: invalid_client: 7000222 - [2026-07-25 08:31:54Z]: 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: 9c9cc9f5-2159-4635-8799-77a283783300 Correlation ID: 89d16ee6-be05-466c-bdc4-ac80693c34bb Timestamp: 2026-07-25 08:31:54Z - Correlation ID: 89d16ee6-be05-466c-bdc4-ac80693c34bb - Trace ID: 9c9cc9f5-2159-4635-8799-77a283783300
Error getting the secret: invalid_client: 7000222 - [2026-07-25 08:31:54Z]: 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: f3a56f65-1c78-4a09-b112-cb852afa0200 Correlation ID: b50560ea-14c3-4d50-885e-9ef0b5d00ab5 Timestamp: 2026-07-25 08:31:54Z - Correlation ID: b50560ea-14c3-4d50-885e-9ef0b5d00ab5 - Trace ID: f3a56f65-1c78-4a09-b112-cb852afa0200
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)