weaver.exceptions
Errors raised during the Weaver flow.
Some of these error inherit from weaver.owsexceptions.OWSException
and their derived classes to allow
pywps
to automatically understand and render those exception if raised by an underlying weaver
operation.
Module Contents
- exception weaver.exceptions.WeaverException[source]
Base class of exceptions defined by
weaver
package.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ListingInvalidParameter[source]
Error related to an invalid parameter for listing queries.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.InvalidIdentifierValue(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an invalid identifier parameter.
Error indicating that an ID to be employed for following operations is not considered as valid to allow further processing or usage.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.MissingIdentifierValue(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to missing identifier parameter.
Error indicating that an ID to be employed for following operations was missing and cannot continue further processing or usage.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ServiceException(detail: str | None = None, value: Any | None = None, json: weaver.typedefs.JSON | None = None, **kw: Any)[source]
Base exception related to a
weaver.datatype.Service
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ServiceParsingError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to parsing issue of the reference service definition (incorrectly formed XML/JSON contents).
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ServiceNotAccessible(detail=None, headers=None, comment=None, body_template=None, result=None, **kw)[source]
Error related to forbidden access to a service.
Error indicating that a WPS service exists but is not visible to retrieve from the storage backend of an instance of
weaver.store.ServiceStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ServiceNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to non-existent service definition.
Error indicating that an OWS service could not be read from the storage backend by an instance of
weaver.store.ServiceStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ServiceRegistrationError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a registration issue for a service.
Error indicating that an OWS service could not be registered in the storage backend by an instance of
weaver.store.ServiceStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ProcessException(detail: str | None = None, value: Any | None = None, json: weaver.typedefs.JSON | None = None, **kw: Any)[source]
Base exception related to a
weaver.datatype.Process
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ProcessNotAccessible(detail=None, headers=None, comment=None, body_template=None, result=None, **kw)[source]
Error related to forbidden access to a process.
Error indicating that a local WPS process exists but is not visible to retrieve from the storage backend of an instance of
weaver.store.ProcessStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ProcessNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a non-existent process definition.
Error indicating that a local WPS process could not be read from the storage backend by an instance of
weaver.store.ProcessStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ProcessRegistrationError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a registration issue for a process.
Error indicating that a WPS process could not be registered in the storage backend by an instance of
weaver.store.ProcessStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.ProcessInstanceError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an invalid process definition.
Error indicating that the process instance passed is not supported with storage backend by an instance of
weaver.store.ProcessStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.JobException[source]
Base exception related to a
weaver.datatype.Job
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.JobNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a non-existent job definition.
Error indicating that a job could not be read from the storage backend by an instance of
weaver.store.JobStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.JobGone(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to job resource that is gone.
Error indicating that an existing job, although recognized, was dismissed and underlying resources including results are gone.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.JobInvalidParameter(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an invalid search parameter to filter jobs.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.JobStatisticsNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to statistics not available for a Job.
Statistics could be unavailable due to incomplete execution, failed status, or simply because it is an older result generated before this feature was introduced.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.JobRegistrationError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a registration issue for a job.
Error indicating that a job could not be registered in the storage backend by an instance of
weaver.store.JobStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.JobUpdateError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an update issue for a job.
Error indicating that a job could not be updated in the storage backend by an instance of
weaver.store.JobStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.PackageException[source]
Base exception related to a
weaver.processes.wps_package.Package
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.PackageTypeError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an invalid package definition.
Error indicating that an instance of
weaver.processes.wps_package.WpsPackage
could not properly parse input/output type(s) for package deployment or execution.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.PackageParsingError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to parsing of a package definition.
Error indicating that a CWL package could not be properly parsed according to expected structures or unresolved definitions.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.PackageRegistrationError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a registration issue for a package.
Error indicating that an instance of
weaver.processes.wps_package.WpsPackage
could not properly be registered for package deployment because of invalid prerequisites.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.PackageAuthenticationError(detail=None, headers=None, comment=None, body_template=None, result=None, **kw)[source]
Error related to a runtime failure caused by failing authentication prerequisite.
Error indicating that an instance of
weaver.processes.wps_package.WpsPackage
could not properly prepare the package because an authentication requirement could not be fulfilled.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.PackageExecutionError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a runtime issue during package execution.
Error indicating that an instance of
weaver.processes.wps_package.WpsPackage
could not properly execute the package using provided inputs and package definition.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.PackageNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a non-existent package definition.
Error indicating that an instance of
weaver.processes.wps_package.WpsPackage
could not properly retrieve the package definition using provided references.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.PayloadNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a non-existent deployment payload definition.
Error indicating that an instance of
weaver.processes.wps_package.WpsPackage
could not properly retrieve the package deploy payload using provided references.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.QuoteException[source]
Base exception related to a
weaver.datatype.Quote
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.QuoteNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a non-existent quote definition.
Error indicating that a quote could not be read from the storage backend by an instance of
weaver.store.QuoteStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.QuoteRegistrationError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an invalid registration issue for a quote.
Error indicating that a quote could not be registered in the storage backend by an instance of
weaver.store.QuoteStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.QuoteInstanceError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an invalid quote definition.
Error indicating that a given object doesn’t correspond to an expected instance of
weaver.datatype.Quote
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.QuoteEstimationError[source]
Error related to a quote that occurred during its estimation.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.QuoteConversionError[source]
Error related to a quote that occurred during its rate conversion.
Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.BillException[source]
Base exception related to a
weaver.datatype.Bill
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.BillNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a non-existent bill definition.
Error indicating that a bill could not be read from the storage backend by an instance of
weaver.store.BillStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.BillRegistrationError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a registration issue for a bill.
Error indicating that a bill could not be registered in the storage backend by an instance of
weaver.store.BillStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.BillInstanceError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an invalid bill definition.
Error indicating that a given object doesn’t correspond to an expected instance of
weaver.datatype.Bill
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.VaultFileException[source]
Base exception related to a
weaver.datatype.VaultFile
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.VaultFileNotFound(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a non-existent vault file definition.
Error indicating that a vault file could not be read from the storage backend by an instance of
weaver.store.VaultStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.VaultFileRegistrationError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to a registration issue for a vault file.
Error indicating that a vault file could not be registered in the storage backend by an instance of
weaver.store.VaultStore
.Initialize self. See help(type(self)) for accurate signature.
- exception weaver.exceptions.VaultFileInstanceError(detail=None, headers=None, comment=None, body_template=None, json_formatter=None, **kw)[source]
Error related to an invalid vault file definition.
Error indicating that a given object doesn’t correspond to an expected instance of
weaver.datatype.VaultFile
.Initialize self. See help(type(self)) for accurate signature.
- weaver.exceptions.handle_known_exceptions(function: weaver.typedefs.AnyCallableWrapped) Callable [source]
Decorator that catches lower-level raised exception that are known to
weaver
but not bypywps
.See also
weaver.wps.service.WorkerService
Without prior handling of known internal exception,
pywps
generates by default500
internal server error response since it doesn’t know how to interpret more specific exceptions defined inweaver
.The decorator simply returns the known exception such that
weaver.tweens.ows_response_tween()
can later handle it appropriately. Exceptions derived fromweaver.owsexceptions.OWSException
are employed since they, themselves, already have base references topywps.exceptions
classes that the service can understand.Warning
In
pywps
,HTTPException
refers towerkzeug.exceptions.HTTPException
while inweaver
, it ispyramid.httpexceptions.HTTPException
. They both offer similar interfaces and functionalities (headers, body, status-code, etc.), but they are not intercepted in the same try/except blocks.
- weaver.exceptions.log_unhandled_exceptions(logger: logging.Logger = LOGGER, message: str = 'Unhandled exception occurred.', exception: Type[Exception] = Exception, force: bool = False, require_http: bool = True, is_request: bool = True) Callable [source]
Decorator for logging captured exceptions before re-raise.
Decorator that will raise
exception
with specifiedmessage
if an exception is caught while execution the wrapped function, after logging relevant details about the caught exception withlogger
.- Parameters:
logger – logger to use for logging (default: use
weaver.exception.LOGGER
).message – message that will be logged with details and then raised with
exception
.exception – exception type to be raised instead of the caught exception.
force – force handling of any raised exception (default: only known unhandled exceptions are logged).
require_http – consider non HTTP-like exceptions as unknown and raise one instead (default:
True
and raisesHTTPInternalServerError
, unlessexception
is HTTP-like).is_request – specifies if the decorator is applied onto a registered request function to handle its inputs.
- Raises:
exception – if an unknown exception was caught (or forced) during the decorated function’s execution.
Exception – original exception if it is known.