pub struct ErrorResponse {
pub code: ErrorCode,
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: ErrorCode§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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::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) -> Self
fn from(api_error: BackendApiError) -> Self
Converts to this type from the input type.
Source§impl From<CommonApiError> for ErrorResponse
impl From<CommonApiError> for ErrorResponse
Source§fn from(_: CommonApiError) -> Self
fn from(_: CommonApiError) -> Self
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) -> Self
fn from(err_resp: ErrorResponse) -> Self
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) -> Self
fn from(err_resp: ErrorResponse) -> Self
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) -> Self
fn from(err_resp: ErrorResponse) -> Self
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) -> Self
fn from(err_resp: ErrorResponse) -> Self
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) -> Self
fn from(err_resp: ErrorResponse) -> Self
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) -> Self
fn from(err_resp: ErrorResponse) -> Self
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) -> Self
fn from(err_resp: ErrorResponse) -> Self
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) -> Self
fn from(api_error: GatewayApiError) -> Self
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) -> Self
fn from(api_error: LspApiError) -> Self
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) -> Self
fn from(api_error: MegaApiError) -> Self
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) -> Self
fn from(api_error: NodeApiError) -> Self
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) -> Self
fn from(api_error: RunnerApiError) -> Self
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) -> Self
fn from(api_error: SdkApiError) -> Self
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
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