pub struct ErrorResponse {
pub error: Option<String>,
pub type: Option<Type>,
pub code: Option<String>,
pub param: Option<String>,
pub platform: Option<String>,
pub platform_error: Option<HashMap<String, Value>>,
pub details: Option<HashMap<String, Value>>,
}Expand description
ErrorResponse : Canonical error envelope. error is the human-readable message; type, code, param, platform, and platformError are top-level siblings for programmatic handling. For upstream platform failures (type: platform_error), platformError carries the provider’s raw payload verbatim (for Meta: error_subcode, error_user_title, error_user_msg).
Fields§
§error: Option<String>Human-readable error message.
type: Option<Type>Error class for programmatic handling.
code: Option<String>Stable machine-readable error code.
param: Option<String>The request field that caused the error, when applicable.
platform: Option<String>Upstream platform (e.g. meta, google, tiktok) — present when type is platform_error.
platform_error: Option<HashMap<String, Value>>Raw error payload from the upstream platform, passed through verbatim so integrators can read provider-specific codes. For Meta this includes error_subcode, error_user_title, and error_user_msg.
details: Option<HashMap<String, Value>>Additional structured context (e.g. field-level validation errors).
Implementations§
Source§impl ErrorResponse
impl ErrorResponse
Sourcepub fn new() -> ErrorResponse
pub fn new() -> ErrorResponse
Canonical error envelope. error is the human-readable message; type, code, param, platform, and platformError are top-level siblings for programmatic handling. For upstream platform failures (type: platform_error), platformError carries the provider’s raw payload verbatim (for Meta: error_subcode, error_user_title, error_user_msg).
Trait Implementations§
Source§impl Clone for ErrorResponse
impl Clone for ErrorResponse
Source§fn clone(&self) -> ErrorResponse
fn clone(&self) -> ErrorResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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>,
Source§impl PartialEq for ErrorResponse
impl PartialEq for ErrorResponse
Source§fn eq(&self, other: &ErrorResponse) -> bool
fn eq(&self, other: &ErrorResponse) -> bool
self and other values to be equal, and is used by ==.