httpcode is defined only if ret=22 && msg!=null