Chrome complains about unchecked error

I'm getting the following error, when it cannot connect. chrome.runtime.lastError needs to be checked. Then this message goes away.
Unchecked runtime.lastError while running sockets.tcp.connect: net::ERR_CONNECTION_REFUSED
    at Object.callback