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.ActionInputError(err_msg, type='error')[source]

Bases: galaxy.exceptions.MessageException

__init__(err_msg, type='error')[source]
err_code = ErrorCode[code=400008,message=Request contained invalid parameter, action could not be completed.]
status_code = 400
exception galaxy.exceptions.AdminRequiredException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403006,message=Action requires admin account.]
status_code = 403
exception galaxy.exceptions.AuthenticationFailed(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=401001,message=Authentication failed, invalid credentials supplied.]
status_code = 401
exception galaxy.exceptions.AuthenticationRequired(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403001,message=Authentication required for this request]
status_code = 403
exception galaxy.exceptions.ConfigDoesNotAllowException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403004,message=The configuration of this Galaxy instance does not allow that operation]
status_code = 403
exception galaxy.exceptions.ConfigurationError[source]

Bases: exceptions.Exception

err_code = ErrorCode[code=500003,message=Error in a configuration file.]
status_code = 500
exception galaxy.exceptions.Conflict(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=409001,message=Database conflict prevented fulfilling the request.]
status_code = 409
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

err_code = ErrorCode[code=404002,message=This API method or call signature has been deprecated and is no longer available]
status_code = 404
exception galaxy.exceptions.DuplicatedIdentifierException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400011,message=Request contained a duplicated identifier that must be unique.]
status_code = 400
exception galaxy.exceptions.DuplicatedSlugException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400006,message=Slug must be unique per user.]
status_code = 400
exception galaxy.exceptions.InconsistentDatabase(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=500002,message=Inconsistent database prevented fulfilling the request.]
status_code = 500
exception galaxy.exceptions.InsufficientPermissionsException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403005,message=You don't have proper permissions to perform the requested operation]
status_code = 403
exception galaxy.exceptions.InternalServerError(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=500001,message=Internal server error.]
status_code = 500
exception galaxy.exceptions.ItemAccessibilityException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403002,message=User cannot access specified item.]
status_code = 403
exception galaxy.exceptions.ItemDeletionException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

exception galaxy.exceptions.ItemOwnershipException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403003,message=User does not own specified item.]
status_code = 403
exception galaxy.exceptions.MalformedContents(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400013,message=The contents of the request are malformed.]
status_code = 400
exception galaxy.exceptions.MalformedId(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400009,message=The id of the resource is malformed.]
status_code = 400
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.

__init__(err_msg=None, type='info', **extra_error_info)[source]
err_code = ErrorCode[code=0,message=Unknown error occurred while processing request.]
status_code = 400
exception galaxy.exceptions.NotImplemented(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=501001,message=Method is not implemented.]
status_code = 501
exception galaxy.exceptions.ObjectAttributeInvalidException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400004,message=Attempted to create or update object with invalid attribute value.]
status_code = 400
exception galaxy.exceptions.ObjectAttributeMissingException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400005,message=Attempted to create object without required attribute.]
status_code = 400
exception galaxy.exceptions.ObjectInvalid[source]

Bases: exceptions.Exception

Accessed object store ID is invalid

exception galaxy.exceptions.ObjectNotFound(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

Accessed object was not found

err_code = ErrorCode[code=404001,message=No such object found.]
status_code = 404
exception galaxy.exceptions.RequestParameterInvalidException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400008,message=Request contained invalid parameter, action could not be completed.]
status_code = 400
exception galaxy.exceptions.RequestParameterMissingException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400007,message=Request is missing parameter required to complete desired action.]
status_code = 400
exception galaxy.exceptions.ToolMetaParameterException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400012,message=Supplied incorrect or incompatible tool meta parameters.]
status_code = 400
exception galaxy.exceptions.UnknownContentsType(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400010,message=The request contains unknown type of contents.]
status_code = 400

Submodules

galaxy.exceptions.error_codes module

Defines the ErrorCode class and instantiates concrete objects from JSON.

See the file error_codes.json for actual error code descriptions.

class galaxy.exceptions.error_codes.ErrorCode(code, default_error_message)[source]

Bases: object

Small class allowing object representation for error descriptions loaded from JSON.

__init__(code, default_error_message)[source]

Construct a ErrorCode from supplied integer and error message.