Enum rs_consul::ConsulError
source · pub enum ConsulError {
Show 16 variants
InvalidRequest(Error),
RequestError(Error),
ResponseError(Error),
InvalidResponse(Error),
ResponseDeserializationFailed(Error),
ResponseStringDeserializationFailed(Utf8Error),
UnexpectedResponseCode(StatusCode, String),
LockAcquisitionFailure(u64),
InvalidUtf8(Utf8Error),
InvalidBase64(DecodeError),
SyncIoError(Error),
SyncInvalidResponseError(ParseBoolError),
SyncUnexpectedResponseCode(u16, String),
TimeoutExceeded(Duration),
ServiceInstanceResolutionFailed(String),
TransportError(ErrorKind, String),
}
Expand description
The error type returned from all calls into this this crate.
Variants§
InvalidRequest(Error)
The request was invalid and could not be serialized to valid json.
RequestError(Error)
The request was invalid and could not be converted into a proper http request.
ResponseError(Error)
The consul server response could not be converted into a proper http response.
InvalidResponse(Error)
The consul server response was invalid.
ResponseDeserializationFailed(Error)
The consul server response could not be deserialized from json.
ResponseStringDeserializationFailed(Utf8Error)
The consul server response could not be deserialized from bytes.
UnexpectedResponseCode(StatusCode, String)
The consul server response was something other than 200. The status code and the body of the response are included.
LockAcquisitionFailure(u64)
The consul server refused a lock acquisition (usually because some other session has a lock).
InvalidUtf8(Utf8Error)
Consul returned invalid UTF8.
InvalidBase64(DecodeError)
Consul returned invalid base64.
SyncIoError(Error)
IO error from sync api.
SyncInvalidResponseError(ParseBoolError)
Response parse error from sync api.
SyncUnexpectedResponseCode(u16, String)
Unexpected response code from sync api.
TimeoutExceeded(Duration)
Consul request exceeded specified timeout.
ServiceInstanceResolutionFailed(String)
Unable to resolve the service’s instances in Consul.
TransportError(ErrorKind, String)
A transport error occured.