Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Marius van den Beek <[email protected]>
  • Loading branch information
dannon and mvdbeek committed May 1, 2024
1 parent 1c1317b commit e2798c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/galaxy/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MessageException(Exception):
# Error code information embedded into API json responses.
err_code: ErrorCode = error_codes_by_name["UNKNOWN"]

def __init__(self, err_msg: str = "", type="info", **extra_error_info):
def __init__(self, err_msg: Optional[str] = None, type="info", **extra_error_info):
self.err_msg = err_msg or self.err_code.default_error_message
self.type = type
self.extra_error_info = extra_error_info
Expand Down Expand Up @@ -64,7 +64,7 @@ class AcceptedRetryLater(MessageException):
err_code = error_codes_by_name["ACCEPTED_RETRY_LATER"]
retry_after: int

def __init__(self, msg: str, retry_after=60):
def __init__(self, msg: Optional[str] = None, retry_after=60):
super().__init__(msg)
self.retry_after = retry_after

Expand Down Expand Up @@ -136,7 +136,7 @@ class ToolMissingException(MessageException):
status_code = 400
err_code = error_codes_by_name["USER_TOOL_MISSING_PROBLEM"]

def __init__(self, err_msg: str = "", type="info", tool_id=None, **extra_error_info):
def __init__(self, err_msg: Optional[str] = None, type="info", tool_id=None, **extra_error_info):
super().__init__(err_msg, type, **extra_error_info)
self.tool_id = tool_id

Expand All @@ -152,7 +152,7 @@ class ToolInputsNotReadyException(MessageException):


class ToolInputsNotOKException(MessageException):
def __init__(self, err_msg: str = "", type="info", *, src: str, id: int, **extra_error_info):
def __init__(self, err_msg: Optional[str] = None, type="info", *, src: str, id: int, **extra_error_info):
super().__init__(err_msg, type, **extra_error_info)
self.src = src
self.id = id
Expand Down

0 comments on commit e2798c9

Please sign in to comment.