#[non_exhaustive]pub enum ErrorKind {
Unexpected,
Unsupported,
ConfigInvalid,
NotFound,
PermissionDenied,
IsADirectory,
NotADirectory,
AlreadyExists,
RateLimited,
IsSameFile,
ConditionNotMatch,
RangeNotSatisfied,
}Expand description
OpenDAL error categories.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unexpected
OpenDAL don’t know what happened here, and no actions other than just returning it back. For example, s3 returns an internal service error.
Unsupported
Underlying service doesn’t support this operation.
ConfigInvalid
The config for this service is invalid.
NotFound
The given path is not found.
PermissionDenied
The given path doesn’t have enough permission for this operation
IsADirectory
The given path is a directory.
NotADirectory
The given path is not a directory.
AlreadyExists
The given path already exists thus we failed to the specified operation on it.
RateLimited
Requests that sent to this path is over the limit, please slow down.
IsSameFile
The given file paths are same.
ConditionNotMatch
The condition of this operation is not match.
The condition itself is context based.
For example, in S3, the condition can be:
- writing a file with If-Match header but the file’s ETag is not match (will get a 412 Precondition Failed).
- reading a file with If-None-Match header but the file’s ETag is match (will get a 304 Not Modified).
As OpenDAL cannot handle the condition not match error, it will always return this error to users.
So users could to handle this error by themselves.
RangeNotSatisfied
The range of the content is not satisfied.
OpenDAL returns this error to indicate that the range of the read request is not satisfied.