Loading lib/galaxy/files/sources/_pyfilesystem2.py +5 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,10 @@ import fs.errors from fs.base import FS from typing_extensions import Unpack from galaxy.exceptions import MessageException from galaxy.exceptions import ( AuthenticationRequired, MessageException, ) from . import ( BaseFilesSource, FilesSourceOptions, Loading Loading @@ -58,7 +61,7 @@ class PyFilesystem2FilesSource(BaseFilesSource): to_dict = functools.partial(self._resource_info_to_dict, path) return list(map(to_dict, res)) except fs.errors.PermissionDenied as e: raise MessageException( raise AuthenticationRequired( f"Permission Denied. Reason: {e}. Please check your credentials in your preferences for {self.label}." ) except fs.errors.FSError as e: Loading lib/galaxy/files/sources/_rdm.py +2 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ from typing import ( from typing_extensions import Unpack from galaxy.exceptions import MessageException from galaxy.exceptions import AuthenticationRequired from galaxy.files import ProvidesUserFileSourcesUserContext from galaxy.files.sources import ( BaseFilesSource, Loading Loading @@ -199,7 +199,7 @@ class RDMFilesSource(BaseFilesSource): effective_props = self._serialization_props(user_context) token = effective_props.get("token") if not token: raise MessageException( raise AuthenticationRequired( f"Please provide a personal access token in your user's preferences for '{self.label}'" ) return token Loading lib/galaxy/files/sources/dropbox.py +5 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,10 @@ from typing import ( Union, ) from galaxy.exceptions import MessageException from galaxy.exceptions import ( AuthenticationRequired, MessageException, ) from . import ( FilesSourceOptions, FilesSourceProperties, Loading @@ -35,7 +38,7 @@ class DropboxFilesSource(PyFilesystem2FilesSource): # This plugin might raise dropbox.dropbox_client.BadInputException # which is not a subclass of fs.errors.FSError if "OAuth2" in str(e): raise MessageException( raise AuthenticationRequired( f"Permission Denied. Reason: {e}. Please check your credentials in your preferences for {self.label}." ) raise MessageException(f"Error connecting to Dropbox. Reason: {e}") Loading Loading
lib/galaxy/files/sources/_pyfilesystem2.py +5 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,10 @@ import fs.errors from fs.base import FS from typing_extensions import Unpack from galaxy.exceptions import MessageException from galaxy.exceptions import ( AuthenticationRequired, MessageException, ) from . import ( BaseFilesSource, FilesSourceOptions, Loading Loading @@ -58,7 +61,7 @@ class PyFilesystem2FilesSource(BaseFilesSource): to_dict = functools.partial(self._resource_info_to_dict, path) return list(map(to_dict, res)) except fs.errors.PermissionDenied as e: raise MessageException( raise AuthenticationRequired( f"Permission Denied. Reason: {e}. Please check your credentials in your preferences for {self.label}." ) except fs.errors.FSError as e: Loading
lib/galaxy/files/sources/_rdm.py +2 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ from typing import ( from typing_extensions import Unpack from galaxy.exceptions import MessageException from galaxy.exceptions import AuthenticationRequired from galaxy.files import ProvidesUserFileSourcesUserContext from galaxy.files.sources import ( BaseFilesSource, Loading Loading @@ -199,7 +199,7 @@ class RDMFilesSource(BaseFilesSource): effective_props = self._serialization_props(user_context) token = effective_props.get("token") if not token: raise MessageException( raise AuthenticationRequired( f"Please provide a personal access token in your user's preferences for '{self.label}'" ) return token Loading
lib/galaxy/files/sources/dropbox.py +5 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,10 @@ from typing import ( Union, ) from galaxy.exceptions import MessageException from galaxy.exceptions import ( AuthenticationRequired, MessageException, ) from . import ( FilesSourceOptions, FilesSourceProperties, Loading @@ -35,7 +38,7 @@ class DropboxFilesSource(PyFilesystem2FilesSource): # This plugin might raise dropbox.dropbox_client.BadInputException # which is not a subclass of fs.errors.FSError if "OAuth2" in str(e): raise MessageException( raise AuthenticationRequired( f"Permission Denied. Reason: {e}. Please check your credentials in your preferences for {self.label}." ) raise MessageException(f"Error connecting to Dropbox. Reason: {e}") Loading