pub struct ErrorResponse {
pub code: u16,
pub msg: String,
pub data: Value,
pub sensitive: bool,
}Expand description
ErrorResponse is the common JSON-serialized representation for all
ApiErrors. It is the only error struct actually sent across the wire.
Everything else is converted to / from it.
For displaying the full human-readable message to the user, convert
ErrorResponse to the corresponding API error type first.
Fields§
§code: u16§msg: String§data: ValueStructured data associated with this error.
sensitive: boolWhether data contains sensitive information that Lexe shouldn’t see
(e.g. a route). Such data may still be logged by the app or in SDKs but
shouldn’t be logged inside of Lexe infra.
Trait Implementations§
Source§impl Clone for ErrorResponse
impl Clone for ErrorResponse
Source§fn clone(&self) -> ErrorResponse
fn clone(&self) -> ErrorResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorResponse
impl Debug for ErrorResponse
Source§impl Default for ErrorResponse
impl Default for ErrorResponse
Source§fn default() -> ErrorResponse
fn default() -> ErrorResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ErrorResponse
impl<'de> Deserialize<'de> for ErrorResponse
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<BackendApiError> for ErrorResponse
impl From<BackendApiError> for ErrorResponse
Source§fn from(api_error: BackendApiError) -> ErrorResponse
fn from(api_error: BackendApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl From<CommonApiError> for ErrorResponse
impl From<CommonApiError> for ErrorResponse
Source§fn from(_: CommonApiError) -> ErrorResponse
fn from(_: CommonApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl From<ErrorResponse> for BackendApiError
impl From<ErrorResponse> for BackendApiError
Source§fn from(err_resp: ErrorResponse) -> BackendApiError
fn from(err_resp: ErrorResponse) -> BackendApiError
Converts to this type from the input type.
Source§impl From<ErrorResponse> for GatewayApiError
impl From<ErrorResponse> for GatewayApiError
Source§fn from(err_resp: ErrorResponse) -> GatewayApiError
fn from(err_resp: ErrorResponse) -> GatewayApiError
Converts to this type from the input type.
Source§impl From<ErrorResponse> for LspApiError
impl From<ErrorResponse> for LspApiError
Source§fn from(err_resp: ErrorResponse) -> LspApiError
fn from(err_resp: ErrorResponse) -> LspApiError
Converts to this type from the input type.
Source§impl From<ErrorResponse> for MegaApiError
impl From<ErrorResponse> for MegaApiError
Source§fn from(err_resp: ErrorResponse) -> MegaApiError
fn from(err_resp: ErrorResponse) -> MegaApiError
Converts to this type from the input type.
Source§impl From<ErrorResponse> for NodeApiError
impl From<ErrorResponse> for NodeApiError
Source§fn from(err_resp: ErrorResponse) -> NodeApiError
fn from(err_resp: ErrorResponse) -> NodeApiError
Converts to this type from the input type.
Source§impl From<ErrorResponse> for RunnerApiError
impl From<ErrorResponse> for RunnerApiError
Source§fn from(err_resp: ErrorResponse) -> RunnerApiError
fn from(err_resp: ErrorResponse) -> RunnerApiError
Converts to this type from the input type.
Source§impl From<ErrorResponse> for SdkApiError
impl From<ErrorResponse> for SdkApiError
Source§fn from(err_resp: ErrorResponse) -> SdkApiError
fn from(err_resp: ErrorResponse) -> SdkApiError
Converts to this type from the input type.
Source§impl From<GatewayApiError> for ErrorResponse
impl From<GatewayApiError> for ErrorResponse
Source§fn from(api_error: GatewayApiError) -> ErrorResponse
fn from(api_error: GatewayApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl From<LspApiError> for ErrorResponse
impl From<LspApiError> for ErrorResponse
Source§fn from(api_error: LspApiError) -> ErrorResponse
fn from(api_error: LspApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl From<MegaApiError> for ErrorResponse
impl From<MegaApiError> for ErrorResponse
Source§fn from(api_error: MegaApiError) -> ErrorResponse
fn from(api_error: MegaApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl From<NodeApiError> for ErrorResponse
impl From<NodeApiError> for ErrorResponse
Source§fn from(api_error: NodeApiError) -> ErrorResponse
fn from(api_error: NodeApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl From<RunnerApiError> for ErrorResponse
impl From<RunnerApiError> for ErrorResponse
Source§fn from(api_error: RunnerApiError) -> ErrorResponse
fn from(api_error: RunnerApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl From<SdkApiError> for ErrorResponse
impl From<SdkApiError> for ErrorResponse
Source§fn from(api_error: SdkApiError) -> ErrorResponse
fn from(api_error: SdkApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl PartialEq for ErrorResponse
impl PartialEq for ErrorResponse
Source§impl Serialize for ErrorResponse
impl Serialize for ErrorResponse
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ErrorResponse
impl StructuralPartialEq for ErrorResponse
Auto Trait Implementations§
impl Freeze for ErrorResponse
impl RefUnwindSafe for ErrorResponse
impl Send for ErrorResponse
impl Sync for ErrorResponse
impl Unpin for ErrorResponse
impl UnsafeUnpin for ErrorResponse
impl UnwindSafe for ErrorResponse
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
Mutably borrows from an owned value. Read more
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.