Source code for kingfisher_scrapy.exceptions
[docs]
class KingfisherScrapyError(Exception):
"""Base class for exceptions from within this application"""
[docs]
class SpiderArgumentError(KingfisherScrapyError):
"""Raised when a spider argument's value is invalid, from a spider's from_crawler method"""
[docs]
class MissingEnvVarError(KingfisherScrapyError):
"""Raised when a required environment variable is missing, from a spider's from_crawler method"""
[docs]
class IncoherentConfigurationError(KingfisherScrapyError):
"""Raised when a spider is misconfigured by a developer, from a spider's __init__ method"""
[docs]
class AccessTokenError(KingfisherScrapyError):
"""Raised when the maximum number of attempts to retrieve an access token is reached, from a spider callback"""
[docs]
class MissingNextLinkError(KingfisherScrapyError):
"""Raised when a next link is not found on the first page of results, from a spider callback"""
[docs]
class UnknownArchiveFormatError(KingfisherScrapyError):
"""Raised when the archive format of a file can't be determined from the filename, from a spider callback"""
[docs]
class RetryableError(KingfisherScrapyError):
"""Raised when the response is an error, but the request can be retried"""