Warning
This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.exceptions package¶
This module defines Galaxy’s custom exceptions.
A Galaxy exception is an exception that extends MessageException
which
defines an HTTP status code (represented by the status_code attribute) and a
default error message.
New exceptions should be defined by adding an entry to error_codes.json in this directory to define a default error message and a Galaxy “error code”. A concrete Python class should be added in this file defining an HTTP status code (as status_code) and error code (error_code) object loaded dynamically from error_codes.json.
Reflecting Galaxy’s origins as a web application, these exceptions tend to be a bit web-oriented. However this module is a dependency of modules and tools that have nothing to do with the web - keep this in mind when defining exception names and messages.
-
exception
galaxy.exceptions.
MessageException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
exceptions.Exception
Most generic Galaxy exception - indicates merely that some exceptional condition happened.
-
status_code
= 400¶
-
err_code
= ErrorCode[code=0,message=Unknown error occurred while processing request.]¶
-
-
exception
galaxy.exceptions.
ItemDeletionException
(err_msg=None, type='info', **extra_error_info)[source]¶
-
exception
galaxy.exceptions.
ObjectInvalid
[source]¶ Bases:
exceptions.Exception
Accessed object store ID is invalid
-
exception
galaxy.exceptions.
ActionInputError
(err_msg, type='error')[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400008,message=Request contained invalid parameter, action could not be completed.]¶
-
-
exception
galaxy.exceptions.
DuplicatedSlugException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400006,message=Slug must be unique per user.]¶
-
-
exception
galaxy.exceptions.
DuplicatedIdentifierException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400011,message=Request contained a duplicated identifier that must be unique.]¶
-
-
exception
galaxy.exceptions.
ObjectAttributeInvalidException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400004,message=Attempted to create or update object with invalid attribute value.]¶
-
-
exception
galaxy.exceptions.
ObjectAttributeMissingException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400005,message=Attempted to create object without required attribute.]¶
-
-
exception
galaxy.exceptions.
MalformedId
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400009,message=The id of the resource is malformed.]¶
-
-
exception
galaxy.exceptions.
MalformedContents
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400013,message=The contents of the request are malformed.]¶
-
-
exception
galaxy.exceptions.
UnknownContentsType
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400010,message=The request contains unknown type of contents.]¶
-
-
exception
galaxy.exceptions.
RequestParameterMissingException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400007,message=Request is missing parameter required to complete desired action.]¶
-
-
exception
galaxy.exceptions.
ToolMetaParameterException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400012,message=Supplied incorrect or incompatible tool meta parameters.]¶
-
-
exception
galaxy.exceptions.
ToolMissingException
(err_msg=None, type='info', tool_id=None, **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400014,message=Tool could not be found.]¶
-
-
exception
galaxy.exceptions.
RequestParameterInvalidException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 400¶
-
err_code
= ErrorCode[code=400008,message=Request contained invalid parameter, action could not be completed.]¶
-
-
exception
galaxy.exceptions.
AuthenticationFailed
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 401¶
-
err_code
= ErrorCode[code=401001,message=Authentication failed, invalid credentials supplied.]¶
-
-
exception
galaxy.exceptions.
AuthenticationRequired
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 403¶
-
err_code
= ErrorCode[code=403001,message=Authentication required for this request]¶
-
-
exception
galaxy.exceptions.
ItemAccessibilityException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 403¶
-
err_code
= ErrorCode[code=403002,message=User cannot access specified item.]¶
-
-
exception
galaxy.exceptions.
ItemOwnershipException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 403¶
-
err_code
= ErrorCode[code=403003,message=User does not own specified item.]¶
-
-
exception
galaxy.exceptions.
ConfigDoesNotAllowException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 403¶
-
err_code
= ErrorCode[code=403004,message=The configuration of this Galaxy instance does not allow that operation]¶
-
-
exception
galaxy.exceptions.
InsufficientPermissionsException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 403¶
-
err_code
= ErrorCode[code=403005,message=You don't have proper permissions to perform the requested operation]¶
-
-
exception
galaxy.exceptions.
AdminRequiredException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 403¶
-
err_code
= ErrorCode[code=403006,message=Action requires admin account.]¶
-
-
exception
galaxy.exceptions.
UserActivationRequiredException
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 403¶
-
err_code
= ErrorCode[code=403007,message=Action requires account activation.]¶
-
-
exception
galaxy.exceptions.
ObjectNotFound
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
Accessed object was not found
-
status_code
= 404¶
-
err_code
= ErrorCode[code=404001,message=No such object found.]¶
-
-
exception
galaxy.exceptions.
DeprecatedMethod
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
Method (or a particular form/arg signature) has been removed and won’t be available later
-
status_code
= 404¶
-
err_code
= ErrorCode[code=404002,message=This API method or call signature has been deprecated and is no longer available]¶
-
-
exception
galaxy.exceptions.
Conflict
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 409¶
-
err_code
= ErrorCode[code=409001,message=Database conflict prevented fulfilling the request.]¶
-
-
exception
galaxy.exceptions.
ConfigurationError
[source]¶ Bases:
exceptions.Exception
-
status_code
= 500¶
-
err_code
= ErrorCode[code=500003,message=Error in a configuration file.]¶
-
-
exception
galaxy.exceptions.
InconsistentDatabase
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 500¶
-
err_code
= ErrorCode[code=500002,message=Inconsistent database prevented fulfilling the request.]¶
-
-
exception
galaxy.exceptions.
InternalServerError
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 500¶
-
err_code
= ErrorCode[code=500001,message=Internal server error.]¶
-
-
exception
galaxy.exceptions.
ToolExecutionError
(err_msg, type='error', job=None)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 500¶
-
err_code
= ErrorCode[code=500004,message=Tool execution failed due to an internal server error.]¶
-
-
exception
galaxy.exceptions.
NotImplemented
(err_msg=None, type='info', **extra_error_info)[source]¶ Bases:
galaxy.exceptions.MessageException
-
status_code
= 501¶
-
err_code
= ErrorCode[code=501001,message=Method is not implemented.]¶
-
-
exception
galaxy.exceptions.
ContainerCLIError
(msg=None, stdout=None, stderr=None, returncode=None, command=None, subprocess_command=None, **kwargs)[source]¶ Bases:
exceptions.Exception
-
exception
galaxy.exceptions.
ContainerNotFound
(msg=None, container_id=None, **kwargs)[source]¶ Bases:
exceptions.Exception
-
exception
galaxy.exceptions.
ContainerImageNotFound
(msg=None, image=None, **kwargs)[source]¶ Bases:
exceptions.Exception
-
exception
galaxy.exceptions.
ContainerRunError
(msg=None, image=None, command=None, **kwargs)[source]¶ Bases:
exceptions.Exception
-
exception
galaxy.exceptions.
HandlerAssignmentError
(msg=None, obj=None, **kwargs)[source]¶ Bases:
exceptions.Exception