pub enum ErrorCode {
InternalEngine,
InternalApi,
BadRequest,
AuthTokenMissing,
AuthTokenInvalid,
InvalidJson,
InvalidBson,
WrongProtocol,
ConnectionProblem,
MessageTypeNotAccepted,
MessageTypeNotAcceptedForWebRTC,
}Expand description
The type of error sent by the KittyCAD API.
Variants§
InternalEngine
Graphics engine failed to complete request, consider retrying
InternalApi
API failed to complete request, consider retrying
BadRequest
User requested something geometrically or graphically impossible. Don’t retry this request, as it’s inherently impossible. Instead, read the error message and change your request.
AuthTokenMissing
Auth token is missing from the request
AuthTokenInvalid
Auth token is invalid in some way (expired, incorrect format, etc)
InvalidJson
Client sent invalid JSON.
InvalidBson
Client sent invalid BSON.
WrongProtocol
Client sent a message which is not accepted over this protocol.
ConnectionProblem
Problem sending data between client and KittyCAD API.
MessageTypeNotAccepted
Client sent a Websocket message type which the KittyCAD API does not handle.
MessageTypeNotAcceptedForWebRTC
Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<EngineErrorCode> for ErrorCode
impl From<EngineErrorCode> for ErrorCode
Because EngineErrorCode is a subset of ErrorCode, you can trivially map
each variant of the former to a variant of the latter.
source§fn from(value: EngineErrorCode) -> Self
fn from(value: EngineErrorCode) -> Self
source§impl JsonSchema for ErrorCode
impl JsonSchema for ErrorCode
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moresource§impl Ord for ErrorCode
impl Ord for ErrorCode
source§impl PartialEq for ErrorCode
impl PartialEq for ErrorCode
source§impl PartialOrd for ErrorCode
impl PartialOrd for ErrorCode
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more