rails/activestorage/lib/active_storage/errors.rb
Gannon McGibbon aaa64687e8
Revert #38957 (#44287)
* Revert "Pass service_name param to DirectUploadsController"

This reverts commit 193289dbbe146c56ec16faf8dd1a2c88611feb83.

* Revert "Multi-service direct uploads in Action Text attachment uploads"

This reverts commit 0b69ad4de6ef89c285833a90dd23db25cad7b669.
2022-01-29 14:27:45 +01:00

30 lines
1.2 KiB
Ruby

# frozen_string_literal: true
module ActiveStorage
# Generic base class for all Active Storage exceptions.
class Error < StandardError; end
# Raised when ActiveStorage::Blob#variant is called on a blob that isn't variable.
# Use ActiveStorage::Blob#variable? to determine whether a blob is variable.
class InvariableError < Error; end
# Raised when ActiveStorage::Blob#preview is called on a blob that isn't previewable.
# Use ActiveStorage::Blob#previewable? to determine whether a blob is previewable.
class UnpreviewableError < Error; end
# Raised when ActiveStorage::Blob#representation is called on a blob that isn't representable.
# Use ActiveStorage::Blob#representable? to determine whether a blob is representable.
class UnrepresentableError < Error; end
# Raised when uploaded or downloaded data does not match a precomputed checksum.
# Indicates that a network error or a software bug caused data corruption.
class IntegrityError < Error; end
# Raised when ActiveStorage::Blob#download is called on a blob where the
# backing file is no longer present in its service.
class FileNotFoundError < Error; end
# Raised when a Previewer is unable to generate a preview image.
class PreviewError < Error; end
end