pub enum Error {
MachineNotAuthorized(Url),
NeedsMachineAuth,
InvalidUrl(Url),
Registration(String),
RateLimited(Duration),
NetworkError(Operation),
Internal(InternalErrorKind, Operation),
}Expand description
An error which occurred while connecting to the control server or control plane.
Variants§
MachineNotAuthorized(Url)
A machine was not authorized by control to join tailnet; authorize via the supplied URL.
NeedsMachineAuth
A machine is not yet authorized and control offered no interactive auth URL — it is
awaiting admin approval on an approval-gated tailnet. Transient and recoverable: the node
holds a valid key and must poll-and-retry registration until an admin approves, then it comes
up with no re-registration (Go’s ipn.State::NeedsMachineAuth → Starting auto-transition).
Distinct from Internal(MachineAuthorization, _) so the control runner can
tell “awaiting approval” (poll) apart from a hard internal failure (stop), and from
MachineNotAuthorized which carries a URL for interactive login.
InvalidUrl(Url)
The user supplied an invalid URL.
Registration(String)
Control rejected registration with a specific reason (e.g. a bad/expired/unknown auth key).
The string is control’s verbatim RegisterResponse.Error message.
RateLimited(Duration)
Control rate-limited us (HTTP 429). The Duration is the
server-requested cooldown (from Retry-After); the retry loop waits exactly this before the
next attempt rather than its own backoff, so we never re-hit control inside the cooldown.
NetworkError(Operation)
Some kind of networking error.
These might be addressed by retrying, or might be an unresolvable error.
Operation is intended to be informational, rather then inspected during handling.
Internal(InternalErrorKind, Operation)
An internal error that users of the library are not expected to handle.
InternalErrorKind and Operation are intended to be informational, rather then
inspected during handling.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.