Skip to content

Fix misleading error logs for empty/failed JSON-RPC responses in Device_WiFi_SSID - #407

Open
Vismalskumar0 with Copilot wants to merge 1 commit into
feature/RDKEMW-14686_finalfrom
copilot/sub-pr-399-e1582b93-efb0-4fa4-9125-e0aacb657df8
Open

Fix misleading error logs for empty/failed JSON-RPC responses in Device_WiFi_SSID#407
Vismalskumar0 with Copilot wants to merge 1 commit into
feature/RDKEMW-14686_finalfrom
copilot/sub-pr-399-e1582b93-efb0-4fa4-9125-e0aacb657df8

Conversation

Copilot AI commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

The else branches handling empty/failed getJsonRPCData() responses were logging "curl init failed", which was inaccurate — curl may have succeeded but returned an empty or unparseable response.

Changes

  • GetConnectedSSID: Replaced the if (!response.empty()) guard with an explicit early-exit pattern:

    if (response.empty())
    {
        RDK_LOG(RDK_LOG_ERROR, LOG_TR69HOSTIF,
            "%s: Empty response received from NetworkManager.GetConnectedSSID JSON-RPC request\n",
            __FUNCTION__);
        return NOK;
    }
  • GetAvailableInterfaces / GetWifiState: Replaced "curl init failed" in the else branches with "getJsonRPCData() failed" to accurately reflect the actual failure point.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] [WIP] Address feedback on Device_WiFi_SSID.cpp update Fix misleading error logs for empty/failed JSON-RPC responses in Device_WiFi_SSID Mar 12, 2026
@Vismalskumar0
Vismalskumar0 marked this pull request as ready for review March 12, 2026 11:27
Copilot AI review requested due to automatic review settings March 12, 2026 11:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants