pub enum RedirectorError {
FileCreationError(Error),
ShortLinkNotFound,
InvalidUrlPath(UrlPathError),
FailedToReadRegistry(Error),
}
Expand description
Errors that can occur during redirect operations.
Variants§
FileCreationError(Error)
An I/O error occurred while creating or writing redirect files.
This includes errors like permission denied, disk full, or invalid file paths.
ShortLinkNotFound
The short link has not been generated (should not occur in normal usage).
This error is included for completeness but should not happen since
short links are automatically generated during Redirector::new()
.
InvalidUrlPath(UrlPathError)
The provided URL path is invalid.
This occurs when the path contains invalid characters like query parameters (?), semicolons (;), or other forbidden characters.
FailedToReadRegistry(Error)
An error occurred while reading or writing the redirect registry.
This occurs when the registry.json
file cannot be read, parsed, or written.
Common causes include corrupted JSON, permission issues, or filesystem errors.