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-02 21:17:48Z]: 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: 3c2428e4-f402-4ef5-9e97-cef18ae72200 Correlation ID: 55bb1887-d7be-4596-b31b-72ad9109b61f Timestamp: 2026-10-02 21:17:48Z - Correlation ID: 55bb1887-d7be-4596-b31b-72ad9109b61f - Trace ID: 3c2428e4-f402-4ef5-9e97-cef18ae72200
(node:860) [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-02 21:17:48Z]: 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: 6d526de0-bcac-491b-8536-eccb9f227c00 Correlation ID: 3c392412-2120-42fe-aa74-eaec428cbdd3 Timestamp: 2026-10-02 21:17:48Z - Correlation ID: 3c392412-2120-42fe-aa74-eaec428cbdd3 - Trace ID: 6d526de0-bcac-491b-8536-eccb9f227c00
Error getting the secret: invalid_client: 7000222 - [2026-10-02 21:17:48Z]: 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: 3c2428e4-f402-4ef5-9e97-cef1afe72200 Correlation ID: 0cfcd302-1a83-45c0-b5b8-77bbdadfa208 Timestamp: 2026-10-02 21:17:48Z - Correlation ID: 0cfcd302-1a83-45c0-b5b8-77bbdadfa208 - Trace ID: 3c2428e4-f402-4ef5-9e97-cef1afe72200
Error getting the secret: invalid_client: 7000222 - [2026-10-02 21:17:49Z]: 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: 3c2428e4-f402-4ef5-9e97-cef1bee72200 Correlation ID: 5868ffdf-7be6-4e69-af46-8243d75450c9 Timestamp: 2026-10-02 21:17:49Z - Correlation ID: 5868ffdf-7be6-4e69-af46-8243d75450c9 - Trace ID: 3c2428e4-f402-4ef5-9e97-cef1bee72200
Error getting the secret: invalid_client: 7000222 - [2026-10-02 21:17:49Z]: 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: f265dd33-d7ab-4c71-838d-fb737fcf4b00 Correlation ID: 6ee64037-7619-471e-9322-cc6bd3256fc4 Timestamp: 2026-10-02 21:17:49Z - Correlation ID: 6ee64037-7619-471e-9322-cc6bd3256fc4 - Trace ID: f265dd33-d7ab-4c71-838d-fb737fcf4b00
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)