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-23 20:27:57Z]: 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: eedbc046-3287-48ee-86c6-ae17287a1800 Correlation ID: bdbb426b-dc22-4cb4-a9b2-fbf6a041e822 Timestamp: 2026-07-23 20:27:57Z - Correlation ID: bdbb426b-dc22-4cb4-a9b2-fbf6a041e822 - Trace ID: eedbc046-3287-48ee-86c6-ae17287a1800
(node:2288) [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-23 20:27:57Z]: 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: 09c38ea7-1bbb-426c-b13f-7ea8c7176800 Correlation ID: e672dc39-f0b1-4c7b-b63a-d5d73f289a2a Timestamp: 2026-07-23 20:27:57Z - Correlation ID: e672dc39-f0b1-4c7b-b63a-d5d73f289a2a - Trace ID: 09c38ea7-1bbb-426c-b13f-7ea8c7176800
Error getting the secret: invalid_client: 7000222 - [2026-07-23 20:27:57Z]: 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: 81a5e756-8738-4557-8e8a-3ed8b4884f00 Correlation ID: 9cdfd4be-04d9-4b74-bc91-272ac06c8c72 Timestamp: 2026-07-23 20:27:57Z - Correlation ID: 9cdfd4be-04d9-4b74-bc91-272ac06c8c72 - Trace ID: 81a5e756-8738-4557-8e8a-3ed8b4884f00
Error getting the secret: invalid_client: 7000222 - [2026-07-23 20:27:58Z]: 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: 8b5b95e0-c05f-4b68-9591-5e8e8b706500 Correlation ID: 919b7d97-4896-4ce1-8577-e13774f8fbeb Timestamp: 2026-07-23 20:27:58Z - Correlation ID: 919b7d97-4896-4ce1-8577-e13774f8fbeb - Trace ID: 8b5b95e0-c05f-4b68-9591-5e8e8b706500
Error getting the secret: invalid_client: 7000222 - [2026-07-23 20:27:58Z]: 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: 3bcd93c8-428a-4f25-9ff9-cc9fde052900 Correlation ID: 4817d665-3535-4dd3-a8c5-e4bafeb746eb Timestamp: 2026-07-23 20:27:58Z - Correlation ID: 4817d665-3535-4dd3-a8c5-e4bafeb746eb - Trace ID: 3bcd93c8-428a-4f25-9ff9-cc9fde052900
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)