Better handling for not connecting or json decode error