code: def has_error(self):
          
          self.get_info()
  
          if 'status' not in self.info:
              return False
          if 'hasError' not in self.info['status']:
              return False
  
          return self.info['status']['hasError']
docs: Queries the server to check if the job has an error.
          Returns True or False.