From 3b6162de670d47856e6d377912c2fdf4d5f430a9 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Fri, 6 Nov 2020 16:34:09 +0000 Subject: [PATCH] Refactor Forecast to also use shared AWSError class --- moto/forecast/exceptions.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/moto/forecast/exceptions.py b/moto/forecast/exceptions.py index ad86e90f..dbc6f641 100644 --- a/moto/forecast/exceptions.py +++ b/moto/forecast/exceptions.py @@ -1,22 +1,6 @@ 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 InvalidInputException(AWSError):