diff --git a/lib/galaxy/exceptions/__init__.py b/lib/galaxy/exceptions/__init__.py index 6ffb0ba628e1..dce09aa6f69c 100644 --- a/lib/galaxy/exceptions/__init__.py +++ b/lib/galaxy/exceptions/__init__.py @@ -38,7 +38,7 @@ def __init__(self, err_msg: Optional[str] = None, type="info", **extra_error_inf self.extra_error_info = extra_error_info @staticmethod - def from_code(status_code: int, message: Optional[str]) -> "MessageException": + def from_code(status_code: int, message: Optional[str] = None) -> "MessageException": exception_class = MessageException if status_code == 404: exception_class = ObjectNotFound