pub enum SteamUserError {
Show 29 variants
NotLoggedIn,
SessionExpired,
FamilyViewRestricted,
LimitedAccount(String),
HttpError(Error),
MalformedResponse(String),
SteamError(String),
EResult {
code: i32,
message: String,
},
InvalidConfirmationKey,
ConfirmationNotFound(u64),
TwoFactorError(String),
InvalidImageFormat(String),
RateLimited,
MissingCredential {
field: &'static str,
},
HttpStatus {
status: u16,
url: String,
},
ClientBuild(String),
RedirectError(String),
InvalidInput(String),
ProtobufEncode(EncodeError),
ProtobufDecode(DecodeError),
UrlError(ParseError),
JsonError(Error),
Base64Error(DecodeError),
Io(Error),
SystemTime(SystemTimeError),
Other(String),
Totp(TotpError),
Middleware(Error),
ActionFailed {
action: ApiAction,
source: Box<SteamUserError>,
},
}Expand description
Errors that can occur during Steam Community operations.
Variants§
NotLoggedIn
Not logged in to Steam Community.
SessionExpired
Session has expired and needs to be refreshed.
FamilyViewRestricted
Family View is restricting access.
LimitedAccount(String)
Account is limited (e.g. no games) and cannot access Web API.
HttpError(Error)
HTTP request failed.
MalformedResponse(String)
Invalid response from Steam.
SteamError(String)
Steam returned an error.
EResult
Steam returned an EResult error code.
InvalidConfirmationKey
Invalid confirmation key.
ConfirmationNotFound(u64)
Confirmation not found.
TwoFactorError(String)
Invalid 2FA setup state.
InvalidImageFormat(String)
Invalid image format.
RateLimited
Rate limited by Steam.
MissingCredential
A required credential (token/secret) is missing.
HttpStatus
HTTP request returned a non-success status code.
ClientBuild(String)
Failed to build the HTTP client.
RedirectError(String)
Redirect handling error (loop, missing Location header, too many hops).
InvalidInput(String)
Invalid or malformed input parameter.
ProtobufEncode(EncodeError)
Protobuf encoding error.
ProtobufDecode(DecodeError)
Protobuf decoding error.
UrlError(ParseError)
URL parsing error.
JsonError(Error)
JSON parsing error.
Base64Error(DecodeError)
Base64 decoding error.
Io(Error)
I/O error (filesystem, OS-level).
SystemTime(SystemTimeError)
SystemTime error (clock went backwards before UNIX epoch).
Other(String)
Other error.
Totp(TotpError)
TOTP generation error.
Middleware(Error)
Middleware error from reqwest-middleware. Note: We use anyhow::Error here because reqwest-middleware::Error::Middleware wraps anyhow::Error, and we want to preserve the full error chain.
ActionFailed
An error that occurred while performing a specific API action.
Implementations§
Source§impl SteamUserError
impl SteamUserError
Sourcepub fn api_action(&self) -> Option<ApiAction>
pub fn api_action(&self) -> Option<ApiAction>
Check if this error was wrapped with an API action context.
Sourcepub fn from_eresult(code: i32) -> Self
pub fn from_eresult(code: i32) -> Self
Create an EResult error from a code.
Sourcepub fn check_eresult(code: i32) -> Result<(), Self>
pub fn check_eresult(code: i32) -> Result<(), Self>
Check if eresult code is OK (1).
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if the error is likely transient and safe to retry.
Trait Implementations§
Source§impl Debug for SteamUserError
impl Debug for SteamUserError
Source§impl Display for SteamUserError
impl Display for SteamUserError
Source§impl Error for SteamUserError
impl Error for SteamUserError
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()
Source§impl From<DecodeError> for SteamUserError
impl From<DecodeError> for SteamUserError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<DecodeError> for SteamUserError
impl From<DecodeError> for SteamUserError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<EncodeError> for SteamUserError
impl From<EncodeError> for SteamUserError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Source§impl From<Error> for SteamUserError
impl From<Error> for SteamUserError
Source§impl From<Error> for SteamUserError
impl From<Error> for SteamUserError
Source§impl From<Error> for SteamUserError
impl From<Error> for SteamUserError
Source§impl From<Error> for SteamUserError
impl From<Error> for SteamUserError
Source§impl From<ParseError> for SteamUserError
impl From<ParseError> for SteamUserError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<SystemTimeError> for SteamUserError
impl From<SystemTimeError> for SteamUserError
Source§fn from(source: SystemTimeError) -> Self
fn from(source: SystemTimeError) -> Self
Auto Trait Implementations§
impl Freeze for SteamUserError
impl !RefUnwindSafe for SteamUserError
impl Send for SteamUserError
impl Sync for SteamUserError
impl Unpin for SteamUserError
impl UnsafeUnpin for SteamUserError
impl !UnwindSafe for SteamUserError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more