#[non_exhaustive]pub enum SeerError {
Show 24 variants
WhoisError(String),
WhoisServerNotFound(String),
WhoisConnectionFailed(String),
RdapError(String),
RdapBootstrapError(String),
DnsError(String),
DnsResolverError(String),
InvalidDomain(String),
DomainNotAllowed {
domain: String,
tld: String,
},
InvalidIpAddress(String),
InvalidRecordType(String),
HttpError(String),
ReqwestError {
message: String,
transient: bool,
},
JsonError(Error),
Timeout(String),
RateLimited(String),
CertificateError(String),
SslError(String),
BulkOperationError {
context: String,
failures: Vec<(String, String)>,
},
LookupFailed {
domain: String,
details: String,
registry_url: String,
},
ConfigError(String),
InvalidInput(String),
Other(String),
RetryExhausted {
attempts: usize,
last_error: Box<SeerError>,
},
}Expand description
Central error type for all seer-core operations.
Marked #[non_exhaustive] so adding a variant is not a semver break for
downstream consumers (matches need a wildcard arm). Third-party error
types (reqwest, hickory) are converted to owned data at the From
boundary instead of being embedded, so a major bump of those dependencies
no longer changes this public API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WhoisError(String)
WhoisServerNotFound(String)
WhoisConnectionFailed(String)
RdapError(String)
RdapBootstrapError(String)
DnsError(String)
DnsResolverError(String)
Low-level resolver transport failure, captured as text at the
From<hickory_resolver::net::NetError> boundary.
InvalidDomain(String)
DomainNotAllowed
InvalidIpAddress(String)
InvalidRecordType(String)
HttpError(String)
ReqwestError
Transport-level HTTP failure, captured as owned data at the
From<reqwest::Error> boundary.
Fields
transient: boolWhether the failure is transient (connect / timeout / 429 / 5xx),
classified once while the typed error is still available. Read by
the retry classifier (crate::retry::NetworkRetryClassifier).
JsonError(Error)
Timeout(String)
RateLimited(String)
CertificateError(String)
SslError(String)
BulkOperationError
LookupFailed
ConfigError(String)
InvalidInput(String)
Other(String)
RetryExhausted
Implementations§
Source§impl SeerError
impl SeerError
Sourcepub fn sanitized_message(&self) -> String
pub fn sanitized_message(&self) -> String
Returns a sanitized error message safe for external exposure (API responses, MCP tool results, Python exceptions).
Transport/network variants collapse to their CATEGORY with no inner
detail, so an upstream server hostname/URL, a resolver-config fragment,
a filesystem path, or a raw system error can never reach an external
consumer. Full detail is still available for internal logging via the
Display impl (to_string()) — log that, return this. User-input
echoes (invalid domain / IP / record type / not-allowed TLD / generic
input validation) are kept because they are the caller’s own input and
are needed to act on the error.
Trait Implementations§
Source§impl Error for SeerError
impl Error for SeerError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SeerError
impl !UnwindSafe for SeerError
impl Freeze for SeerError
impl Send for SeerError
impl Sync for SeerError
impl Unpin for SeerError
impl UnsafeUnpin for SeerError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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