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-04-26 08:06:10Z]: 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: 87692ae8-4c25-48fb-a6fb-771bac6a2300 Correlation ID: a0045808-98f0-4f88-b5c7-3e708f17c335 Timestamp: 2026-04-26 08:06:10Z - Correlation ID: a0045808-98f0-4f88-b5c7-3e708f17c335 - Trace ID: 87692ae8-4c25-48fb-a6fb-771bac6a2300
(node:4980) [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-04-26 08:06: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: ce4d1119-1883-47f8-b921-d9d4e6162600 Correlation ID: 66ab29d1-2b37-43eb-bbed-1acd0b6e59bd Timestamp: 2026-04-26 08:06:11Z - Correlation ID: 66ab29d1-2b37-43eb-bbed-1acd0b6e59bd - Trace ID: ce4d1119-1883-47f8-b921-d9d4e6162600
Error getting the secret: invalid_client: 7000222 - [2026-04-26 08:06: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: 11363176-b169-401b-b43a-ffe034a12200 Correlation ID: 4c905be8-ab57-426c-8f63-b91ceff748d7 Timestamp: 2026-04-26 08:06:11Z - Correlation ID: 4c905be8-ab57-426c-8f63-b91ceff748d7 - Trace ID: 11363176-b169-401b-b43a-ffe034a12200
Error getting the secret: invalid_client: 7000222 - [2026-04-26 08:06: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: 0e9a6a84-b584-450a-bf4e-8cfaf99b2100 Correlation ID: ad5c4344-1ec7-461a-8eb6-e563d87a3548 Timestamp: 2026-04-26 08:06:11Z - Correlation ID: ad5c4344-1ec7-461a-8eb6-e563d87a3548 - Trace ID: 0e9a6a84-b584-450a-bf4e-8cfaf99b2100
Error getting the secret: invalid_client: 7000222 - [2026-04-26 08:06: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: d18f9a46-74da-4dd4-9788-4eb32cae1e00 Correlation ID: 053cc468-411e-466e-8d7e-9119e10a5b1c Timestamp: 2026-04-26 08:06:11Z - Correlation ID: 053cc468-411e-466e-8d7e-9119e10a5b1c - Trace ID: d18f9a46-74da-4dd4-9788-4eb32cae1e00
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)