piwebasync/api/models.py
def raise_for_status(self):
        """
        Raise HTTPStatusErorr for non successful request or error
        parsing content
        """
        
        status_code = self.status_code
        if not codes.is_success(status_code):
            reason_phrase = codes.get_reason_phrase(status_code)
            errors = self.dict().get('Errors')
            message = f"{status_code}: {reason_phrase}. The following errors occurred {errors}"
            raise HTTPStatusError(message)
        elif codes.is_success(status_code) and self.dict().get('ErrorMessage') is not None:
            reason_phrase = "JSON Parsing Error"
            errors = self.dict().get('ErrorMessage')
            message = f"{status_code}: {reason_phrase}. The following errors occurred {errors}"
            raise HTTPStatusError(message)

        Raise HTTPStatusErorr for non successful request or error
        parsing content
        
Raise HTTPStatusErorr for non successful request or error
parsing content
Raise HTTPStatusErorr for non successful request or error parsing content
def raise_for_status(self):
        status_code = self.status_code
        if not codes.is_success(status_code):
            reason_phrase = codes.get_reason_phrase(status_code)
            errors = self.dict().get('Errors')
            message = f"{status_code}: {reason_phrase}. The following errors occurred {errors}"
            raise HTTPStatusError(message)
        elif codes.is_success(status_code) and self.dict().get('ErrorMessage') is not None:
            reason_phrase = "JSON Parsing Error"
            errors = self.dict().get('ErrorMessage')
            message = f"{status_code}: {reason_phrase}. The following errors occurred {errors}"
            raise HTTPStatusError(message)
def raise_for_status ( self ) : status_code = self . status_code if not codes . is_success ( status_code ) : reason_phrase = codes . get_reason_phrase ( status_code ) errors = self . dict ( ) . get ( 'Errors' ) message = f"{status_code}: {reason_phrase}. The following errors occurred {errors}" raise HTTPStatusError ( message ) elif codes . is_success ( status_code ) and self . dict ( ) . get ( 'ErrorMessage' ) is not None : reason_phrase = "JSON Parsing Error" errors = self . dict ( ) . get ( 'ErrorMessage' ) message = f"{status_code}: {reason_phrase}. The following errors occurred {errors}" raise HTTPStatusError ( message )
Raise HTTPStatusErorr for non successful request or error
parsing content
Raise HTTPStatusErorr for non successful request or error parsing content
"""
        Raise HTTPStatusErorr for non successful request or error
        parsing content
        """
self