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-02 04:48:15Z]: 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: b017bc0c-d901-4624-ad91-30a6df5c0700 Correlation ID: fed07c25-3fc0-4479-b93b-7a370fee5b9f Timestamp: 2026-07-02 04:48:15Z - Correlation ID: fed07c25-3fc0-4479-b93b-7a370fee5b9f - Trace ID: b017bc0c-d901-4624-ad91-30a6df5c0700
(node:988) [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-02 04:48:16Z]: 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: 7f771376-2b18-41a8-8811-24899c2c8900 Correlation ID: ff1cd77f-efc3-42e7-a68e-cab6c7c88a37 Timestamp: 2026-07-02 04:48:16Z - Correlation ID: ff1cd77f-efc3-42e7-a68e-cab6c7c88a37 - Trace ID: 7f771376-2b18-41a8-8811-24899c2c8900
Error getting the secret: invalid_client: 7000222 - [2026-07-02 04:48:16Z]: 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: e9214e44-4f45-499e-b086-15773b119500 Correlation ID: e8b8cca2-17fa-4738-981f-aaf6ad94513f Timestamp: 2026-07-02 04:48:16Z - Correlation ID: e8b8cca2-17fa-4738-981f-aaf6ad94513f - Trace ID: e9214e44-4f45-499e-b086-15773b119500
Error getting the secret: invalid_client: 7000222 - [2026-07-02 04:48:16Z]: 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: 0b38dd17-ad4a-4da9-a74a-290cbb371500 Correlation ID: 8e768540-e0dd-47d2-b2b7-07ac45d32eec Timestamp: 2026-07-02 04:48:16Z - Correlation ID: 8e768540-e0dd-47d2-b2b7-07ac45d32eec - Trace ID: 0b38dd17-ad4a-4da9-a74a-290cbb371500
Error getting the secret: invalid_client: 7000222 - [2026-07-02 04:48:17Z]: 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: afcdbea9-3081-4475-ae95-a667b8863200 Correlation ID: a103d743-b91d-48b7-a456-80d8d5894fde Timestamp: 2026-07-02 04:48:17Z - Correlation ID: a103d743-b91d-48b7-a456-80d8d5894fde - Trace ID: afcdbea9-3081-4475-ae95-a667b8863200
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)