Enum kube::Error [−][src]
pub enum Error {
Show 23 variants
Api(ErrorResponse),
Connection(Error),
HyperError(Error),
Service(Box<dyn Error + Send + Sync + 'static, Global>),
FromUtf8(FromUtf8Error),
LinesCodecMaxLineLengthExceeded,
ReadEvents(Error),
HttpError(Error),
InvalidUri(InvalidUri),
SerdeError(Error),
RequestBuild,
RequestSend,
RequestParse,
RequestValidation(String),
Kubeconfig(ConfigError),
Discovery(DiscoveryError),
SslError(String),
OpensslError(ErrorStack),
ProtocolSwitch(StatusCode),
MissingUpgradeWebSocketHeader,
MissingConnectionUpgradeHeader,
SecWebSocketAcceptKeyMismatch,
SecWebSocketProtocolMismatch,
}
config
or client
only.Expand description
Possible errors when working with kube
Variants
Api(ErrorResponse)
ApiError for when things fail
This can be parsed into as an error handling fallback.
It’s also used in WatchEvent
from watch calls.
It’s quite common to get a 410 Gone
when the resourceVersion
is too old.
Tuple Fields of Api
Connection(Error)
ConnectionError for when TcpStream fails to connect.
Tuple Fields of Connection
0: Error
client
only.Hyper error
client
only.Service error
FromUtf8(FromUtf8Error)
UTF-8 Error
Tuple Fields of FromUtf8
Returned when failed to find a newline character within max length.
Only returned by Client::request_events
and this should never happen as
the max is usize::MAX
.
ReadEvents(Error)
Returned on std::io::Error
when reading event stream.
Tuple Fields of ReadEvents
0: Error
HttpError(Error)
Http based error
Tuple Fields of HttpError
0: Error
InvalidUri(InvalidUri)
Failed to construct a URI.
Tuple Fields of InvalidUri
0: InvalidUri
SerdeError(Error)
Common error case when requesting parsing into own structs
Tuple Fields of SerdeError
0: Error
Error building a request
Error sending a request
Error parsing a response
RequestValidation(String)
A request validation failed
Tuple Fields of RequestValidation
0: String
Kubeconfig(ConfigError)
Configuration error
Tuple Fields of Kubeconfig
0: ConfigError
Discovery(DiscoveryError)
Discovery errors
Tuple Fields of Discovery
SslError(String)
An error with configuring SSL occured
Tuple Fields of SslError
0: String
OpensslError(ErrorStack)
native-tls
only.An error from openssl when handling configuration
Tuple Fields of OpensslError
0: ErrorStack
ProtocolSwitch(StatusCode)
ws
only.The server did not respond with SWITCHING_PROTOCOLS
status when upgrading the
connection.
Tuple Fields of ProtocolSwitch
0: StatusCode
ws
only.Upgrade
header was not set to websocket
(case insensitive)
ws
only.Connection
header was not set to Upgrade
(case insensitive)
ws
only.Sec-WebSocket-Accept
key mismatched.
ws
only.Sec-WebSocket-Protocol
mismatched.
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
impl<T> AsErrorSource for T where
T: 'static + Error,
impl<T> AsErrorSource for T where
T: 'static + Error,
pub fn as_error_source(&self) -> &(dyn Error + 'static)
pub fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers. Read more
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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