pub enum Error {
InvalidInput {
message: String,
},
NotFound {
resource: String,
},
PayloadTooLarge {
size: u64,
limit: u64,
},
BucketNameTooLong {
name: String,
len: usize,
},
Config {
message: String,
},
Storage(StorageError),
MalformedRange(String),
NotModified,
PreconditionFailed,
RangeNotSatisfiable {
complete_length: u64,
},
}Expand description
Domain error mapped to §6.12 HTTP status codes.
This is the general error for the API layer — storage-specific errors use StorageError.
Variants§
InvalidInput
Input from the client was invalid (e.g., malformed slug, invalid path).
NotFound
The requested resource was not found.
PayloadTooLarge
The request payload exceeded the allowed size limit.
BucketNameTooLong
The derived S3 bucket name exceeds 63 characters.
Fields
Config
A required configuration value was missing or invalid.
Storage(StorageError)
A storage-layer error (see StorageError).
MalformedRange(String)
Malformed Range: bytes= header — unparseable syntax. Maps to HTTP 400.
NotModified
Backend returned 304 Not Modified (conditional request). Maps to HTTP 304.
PreconditionFailed
Backend returned 412 Precondition Failed (conditional request). Maps to HTTP 412.
RangeNotSatisfiable
Backend returned 416 Range Not Satisfiable. complete_length is the total object size.
Maps to HTTP 416 with Content-Range: bytes */complete_length.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()