def __init__(self, validation_error_exc): """Construct fault with code Client.<validation_error_type_name>.""" message = str(validation_error_exc) # we do not want to reuse initialization of BaseValidationError Fault.__init__( self, faultcode='Client.{0}'.format( type(validation_error_exc).__name__), faultstring=message)
def __init__(self, does_not_exist_exc): """Construct fault with code Client.<object_name>NotFound.""" message = str(does_not_exist_exc) object_name = message.split()[0] # we do not want to reuse initialization of ResourceNotFoundError Fault.__init__( self, faultcode='Client.{0}NotFound'.format(object_name), faultstring=message)
def __init__(self, message, code="HydraError"): Fault.__init__(self, faultcode=code, faultstring=message )
def __init__(self): Fault.__init__(self, faultcode='Client.AuthorizationError', faultstring='You are not authozied to access this resource.' )
def __init__(self, user_name): Fault.__init__(self, faultcode='Client.AuthenticationError', faultstring='Invalid authentication request for %r' % user_name )
def __init__(self, message): Fault.__init__(self, faultcode='NoObjectFoundError', faultstring=message )