Get the whois-related info for a subdomain.
        Optionally include the history for the domain.
        Return {'status': True, 'record': rec} on success
        Return {'error': ...} on error

def get_subdomain_record(self, fqn, include_history=False):
        """
        Get the whois-related info for a subdomain.
        Optionally include the history for the domain.
        Return {'status': True, 'record': rec} on success
        Return {'error': ...} on error
        """
        if not check_subdomain(fqn):
            return {'error': 'invalid subdomain', 'http_status': 400}
        
        fqn = str(fqn)

        # get current record
        subdomain_rec = get_subdomain_info(fqn, check_pending=True)
        if subdomain_rec is None:
            return {'error': 'Failed to load subdomain', 'http_status': 404}
   
        ret = subdomain_rec.to_json()
        if include_history:
            subdomain_hist = get_subdomain_history(fqn, json=True)
            ret['history'] = subdomain_hist

        return {'status': True, 'record': ret}