* Added some member and proposal functions * Added additional member and proposal functions * Fixed admin password return and added update_member along with tests * Added network removal and member removal proposal * Fixed failing test * Fixed Python 2.7 test
49 lines
1.8 KiB
Python
49 lines
1.8 KiB
Python
from __future__ import unicode_literals
|
|
from moto.core.exceptions import RESTError
|
|
|
|
|
|
class ManagedBlockchainClientError(RESTError):
|
|
code = 400
|
|
|
|
|
|
class BadRequestException(ManagedBlockchainClientError):
|
|
def __init__(self, pretty_called_method, operation_error):
|
|
super(BadRequestException, self).__init__(
|
|
"BadRequestException",
|
|
"An error occurred (BadRequestException) when calling the {0} operation: {1}".format(
|
|
pretty_called_method, operation_error
|
|
),
|
|
)
|
|
|
|
|
|
class InvalidRequestException(ManagedBlockchainClientError):
|
|
def __init__(self, pretty_called_method, operation_error):
|
|
super(InvalidRequestException, self).__init__(
|
|
"InvalidRequestException",
|
|
"An error occurred (InvalidRequestException) when calling the {0} operation: {1}".format(
|
|
pretty_called_method, operation_error
|
|
),
|
|
)
|
|
|
|
|
|
class ResourceNotFoundException(ManagedBlockchainClientError):
|
|
def __init__(self, pretty_called_method, operation_error):
|
|
self.code = 404
|
|
super(ResourceNotFoundException, self).__init__(
|
|
"ResourceNotFoundException",
|
|
"An error occurred (BadRequestException) when calling the {0} operation: {1}".format(
|
|
pretty_called_method, operation_error
|
|
),
|
|
)
|
|
|
|
|
|
class ResourceLimitExceededException(ManagedBlockchainClientError):
|
|
def __init__(self, pretty_called_method, operation_error):
|
|
self.code = 429
|
|
super(ResourceLimitExceededException, self).__init__(
|
|
"ResourceLimitExceededException",
|
|
"An error occurred (ResourceLimitExceededException) when calling the {0} operation: {1}".format(
|
|
pretty_called_method, operation_error
|
|
),
|
|
)
|