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-01 02:45:11Z]: 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: 903e6bc1-6076-4100-bbae-7cb094fc6a00 Correlation ID: 1e708695-29c0-4bc6-a659-469ae1e91d3d Timestamp: 2026-07-01 02:45:11Z - Correlation ID: 1e708695-29c0-4bc6-a659-469ae1e91d3d - Trace ID: 903e6bc1-6076-4100-bbae-7cb094fc6a00
(node:3108) [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-01 02:45:11Z]: 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: 38409454-4575-4016-b338-16df4de40700 Correlation ID: 66ac46f3-94a6-45e5-b419-a2e9adb49971 Timestamp: 2026-07-01 02:45:11Z - Correlation ID: 66ac46f3-94a6-45e5-b419-a2e9adb49971 - Trace ID: 38409454-4575-4016-b338-16df4de40700
Error getting the secret: invalid_client: 7000222 - [2026-07-01 02:45:12Z]: 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: e6aa20bb-0eca-4af7-919d-c88140626500 Correlation ID: 6011e6a6-4a84-4a53-92c7-2ac8ddb139bd Timestamp: 2026-07-01 02:45:12Z - Correlation ID: 6011e6a6-4a84-4a53-92c7-2ac8ddb139bd - Trace ID: e6aa20bb-0eca-4af7-919d-c88140626500
Error getting the secret: invalid_client: 7000222 - [2026-07-01 02:45:12Z]: 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: e6aa20bb-0eca-4af7-919d-c88143626500 Correlation ID: 718b047e-d950-4533-88e5-6e0fbb50ce18 Timestamp: 2026-07-01 02:45:12Z - Correlation ID: 718b047e-d950-4533-88e5-6e0fbb50ce18 - Trace ID: e6aa20bb-0eca-4af7-919d-c88143626500
Error getting the secret: invalid_client: 7000222 - [2026-07-01 02:45:12Z]: 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: 12fdc570-b9eb-4d93-b84d-5d0814735c00 Correlation ID: ce24e70b-1bac-4f7a-a719-c05eca2b76d6 Timestamp: 2026-07-01 02:45:12Z - Correlation ID: ce24e70b-1bac-4f7a-a719-c05eca2b76d6 - Trace ID: 12fdc570-b9eb-4d93-b84d-5d0814735c00
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)