Enum mwapi_errors::Error [−][src]
#[non_exhaustive]
pub enum Error {
Show 21 variants
HttpError(Error),
InvalidHeaderValue(InvalidHeaderValue),
JsonError(Error),
LockError(AcquireError),
InvalidEtag,
BadToken,
TokenError(String),
InvalidHeadingLevel(u32),
NotLoggedIn,
NotLoggedInAsBot,
PermissionsError(String),
LoginThrottled,
WrongPassword,
Nobots,
PageDoesNotExist(String),
ProtectedPage,
EditConflict(String),
SpamFilter {
info: String,
matches: Vec<String>,
},
MaxlagError {
info: String,
retry_after: u32,
},
ApiError(ApiError),
UnknownError(String),
}Expand description
Primary error class
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
HttpError(Error)A HTTP error like a 4XX or 5XX status code
Tuple Fields of HttpError
0: ErrorInvalidHeaderValue(InvalidHeaderValue)Invalid header value, likely if the provided OAuth2 token or User-agent are invalid
Tuple Fields of InvalidHeaderValue
JsonError(Error)Error when decoding the JSON response from the API
Tuple Fields of JsonError
0: ErrorLockError(AcquireError)Error if unable to get request concurrency lock
Tuple Fields of LockError
0: AcquireErroretag header is invalid/missing
Token invalid or expired
TokenError(String)Unable to fetch a CSRF token
Tuple Fields of TokenError
0: StringInvalidHeadingLevel(u32)Tuple Fields of InvalidHeadingLevel
0: u32When expected to be logged in but aren’t
When expected to be logged in but aren’t
PermissionsError(String)Tuple Fields of PermissionsError
0: StringWhen {{nobots}} matches
PageDoesNotExist(String)Page does not exist
Tuple Fields of PageDoesNotExist
0: StringPage is protected
EditConflict(String)Edit conflict
Tuple Fields of EditConflict
0: StringTripped the spam filter (aka SpamBlacklist)
ApiError(ApiError)Any arbitrary error returned by the MediaWiki API
Tuple Fields of ApiError
0: ApiErrorUnknownError(String)An error where we don’t know what to do nor have information to report back
Tuple Fields of UnknownError
0: StringImplementations
Whether the issue is related to saving a page
Trait Implementations
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more