#[non_exhaustive]pub enum AuthError {
MissingField(&'static str),
OAuth {
error: String,
error_description: Option<String>,
},
Other(String),
Http(Error),
Serialization(Error),
Url(ParseError),
}Expand description
Errors produced while acquiring or refreshing a Salesforce OAuth session.
The error_description carried by AuthError::OAuth is
server-supplied free text that can include partial token material, so
it is redacted from both the Display and Debug representations of
this type — only the machine-readable error code is shown. Callers
that need the description can read it from the variant field directly.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingField(&'static str)
A required builder field was not set.
OAuth
OAuth token endpoint returned an error response (error /
error_description shape from RFC 6749 §5.2).
Only the machine-readable error code is surfaced via Display;
error_description is redacted (see the type-level note) but
remains available by matching on the field.
Other(String)
Catch-all for auth failures not modelled by a dedicated variant (system clock skew, JWT signing failure, CSPRNG failure, malformed token responses, etc.). Carries the underlying message.
Http(Error)
Network or transport-level HTTP failure while contacting an OAuth endpoint.
Serialization(Error)
JSON serialization or deserialization failure.
Url(ParseError)
URL parsing failure (instance URL, redirect URI, login URL, etc.).
Trait Implementations§
Source§impl Error for AuthError
impl Error for AuthError
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()