def parse_error(response_lines)
      first_line = response_lines.shift

      return nil if first_line == 'OK'
      return Errors::SyncError.new if first_line == 'SYNC ERROR'

      if first_line == 'ERROR'
        error_code = response_lines.shift
        LightstreamerError.build response_lines.shift, error_code
      else
        LightstreamerError.new first_line
      end
    end
def parse_error(response_lines)
      first_line = response_lines.shift

      return nil if first_line == 'OK'
      return Errors::SyncError.new if first_line == 'SYNC ERROR'

      if first_line == 'ERROR'
        error_code = response_lines.shift
        LightstreamerError.build response_lines.shift, error_code
      else
        LightstreamerError.new first_line
      end
    end
Parses the next error from the given lines that were returned by a POST request. The consumed lines are removed
 from the passed array.

 @param [Array<String>] response_lines

 @return [LightstreamerError, nil]