Skip to content

Commit 25a7ada

Browse files
authored
fix: BI-5622 move exception to api_commons (#606)
1 parent f58a38d commit 25a7ada

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/dl_api_commons/dl_api_commons/exc.py

+5
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,8 @@ class FlaskRCINotSet(Exception):
8080
class RequestTimeoutError(DLBaseException):
8181
err_code = DLBaseException.err_code + ["REQUEST_TIMEOUT"]
8282
default_message = "Backend app request timeout exceeded"
83+
84+
85+
class FailedDependencyException(DLBaseException):
86+
err_code = DLBaseException.err_code + ["FAILED_DEPENDENCY"]
87+
default_message = "Failed dependency"

lib/dl_api_lib/dl_api_lib/error_handling.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from marshmallow import ValidationError as MValidationError
1717
from marshmallow import fields
1818

19-
from dl_api_commons.exc import RequestTimeoutError
19+
from dl_api_commons import exc as api_commons_exc
2020
from dl_api_lib import exc
2121
from dl_constants.exc import (
2222
DEFAULT_ERR_CODE_API_PREFIX,
@@ -85,9 +85,9 @@
8585
dl_query_processing.exc.GenericInvalidRequestError: status.BAD_REQUEST,
8686
dl_query_processing.exc.InvalidGroupByConfiguration: status.BAD_REQUEST,
8787
common_exc.WrongQueryParameterization: status.BAD_REQUEST,
88-
RequestTimeoutError: status.FAILED_DEPENDENCY,
88+
api_commons_exc.RequestTimeoutError: status.FAILED_DEPENDENCY,
8989
exc.ConnectorIconNotFoundException: status.NOT_FOUND,
90-
exc.FailedDependencyException: status.FAILED_DEPENDENCY,
90+
api_commons_exc.FailedDependencyException: status.FAILED_DEPENDENCY,
9191
}
9292

9393

lib/dl_api_lib/dl_api_lib/exc.py

-5
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,3 @@ class DLValidationFatal(_DLValidationResult):
4848
class ConnectorIconNotFoundException(DLBaseException):
4949
default_message = "Connector icon not found"
5050
err_code = ["ICON_NOT_FOUND"]
51-
52-
53-
class FailedDependencyException(DLBaseException):
54-
err_code = DLBaseException.err_code + ["FAILED_DEPENDENCY"]
55-
default_message = "Failed dependency"

0 commit comments

Comments
 (0)