Merge pull request #3439 from bblommers/techdebt-remove-duplicate-awserrors

Tech Debt - Remove duplicate AWSError classes
This commit is contained in:
Steve Pulec 2020-11-09 19:59:02 -06:00 committed by GitHub
commit 47dbad291e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 31 additions and 129 deletions

View file

@ -1,21 +1,5 @@
from __future__ import unicode_literals
import json
class AWSError(Exception):
TYPE = None
STATUS = 400
def __init__(self, message, type=None, status=None):
self.message = message
self.type = type if type is not None else self.TYPE
self.status = status if status is not None else self.STATUS
def response(self):
return (
json.dumps({"__type": self.type, "message": self.message}),
dict(status=self.status),
)
from moto.core.exceptions import AWSError
class ExecutionAlreadyExists(AWSError):