pub enum StorageError {
Show 30 variants
InvalidConfiguration(String),
AuthenticationError(String),
PermissionDenied(String),
FileNotFound(String),
FileAlreadyExists(String),
NetworkError(String),
FilesystemError(Error),
InvalidUrl(ParseError),
SerializationError(Error),
Base64Error(DecodeError),
InvalidFileFormat(String),
FileTooLarge {
size: u64,
max_size: u64,
},
ChecksumMismatch {
expected: String,
actual: String,
},
UploadInterrupted(String),
DownloadInterrupted(String),
MultipartUploadError(String),
PresignedUrlError(String),
TemporaryStorageError(String),
QuotaExceeded {
used: u64,
limit: u64,
},
RateLimited {
retry_after: u64,
},
InvalidRange(String),
Timeout {
timeout: u64,
},
OperationFailed {
operation: String,
message: String,
},
UnsupportedOperation {
operation: String,
backend: String,
},
S3OperationFailed {
message: String,
request_id: Option<String>,
},
GcsError(String),
MinIOError(String),
HttpError(Error),
SecurityError {
operation: String,
message: String,
},
Other(String),
}Expand description
Storage error types
Variants§
InvalidConfiguration(String)
Configuration error
AuthenticationError(String)
Authentication error
PermissionDenied(String)
Permission error
FileNotFound(String)
File not found
FileAlreadyExists(String)
File already exists
NetworkError(String)
Network connection error
FilesystemError(Error)
Local filesystem error
InvalidUrl(ParseError)
URL parsing error
SerializationError(Error)
Serialization/deserialization error
Base64Error(DecodeError)
Base64 encoding/decoding error
InvalidFileFormat(String)
Invalid file format
FileTooLarge
File too large
ChecksumMismatch
Checksum mismatch
UploadInterrupted(String)
Upload interrupted
DownloadInterrupted(String)
Download interrupted
MultipartUploadError(String)
Multipart upload error
PresignedUrlError(String)
Presigned URL generation error
TemporaryStorageError(String)
Temporary storage error
QuotaExceeded
Storage quota exceeded
RateLimited
Rate limited
InvalidRange(String)
Invalid range request
Timeout
Timeout error
OperationFailed
Generic operation error
UnsupportedOperation
Unsupported operation for backend
S3OperationFailed
S3 operation error
GcsError(String)
GCS operation error
MinIOError(String)
MinIO specific errors
HttpError(Error)
HTTP client error
SecurityError
Security-related error
Other(String)
Generic error
Implementations§
Source§impl StorageError
impl StorageError
Sourcepub fn config_error(message: impl Into<String>) -> Self
pub fn config_error(message: impl Into<String>) -> Self
Create a configuration error
Sourcepub fn auth_error(message: impl Into<String>) -> Self
pub fn auth_error(message: impl Into<String>) -> Self
Create an authentication error
Sourcepub fn operation_failed(
operation: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn operation_failed( operation: impl Into<String>, message: impl Into<String>, ) -> Self
Create an operation failed error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this is a retryable error
Sourcepub fn is_client_error(&self) -> bool
pub fn is_client_error(&self) -> bool
Check if this is a client error (4xx)
Sourcepub fn is_server_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Check if this is a server error (5xx)
Trait Implementations§
Source§impl Debug for StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl Error for StorageError
impl Error for StorageError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()