pub struct ErrorEnvelope {
pub code: String,
pub message: String,
pub details: Option<Value>,
}Expand description
Error response body.
The inner part of the API error envelope:
{ "error": { "code": "...", "message": "...", "details": { ... } } }.
details carries error-specific structured context (for example the run
holding a conflicting idempotency key). It is omitted from the JSON output
when absent.
§Examples
use ironflow_types::ErrorEnvelope;
let json = r#"{"code": "RUN_NOT_FOUND", "message": "run not found"}"#;
let err: ErrorEnvelope = serde_json::from_str(json).unwrap();
assert_eq!(err.code, "RUN_NOT_FOUND");
assert!(err.details.is_none());Fields§
§code: StringMachine-readable error code (e.g., RUN_NOT_FOUND).
message: StringHuman-readable error message.
details: Option<Value>Optional structured context attached to the error.
Trait Implementations§
Source§impl Clone for ErrorEnvelope
impl Clone for ErrorEnvelope
Source§impl Debug for ErrorEnvelope
impl Debug for ErrorEnvelope
Source§impl<'de> Deserialize<'de> for ErrorEnvelope
impl<'de> Deserialize<'de> for ErrorEnvelope
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
Auto Trait Implementations§
impl Freeze for ErrorEnvelope
impl RefUnwindSafe for ErrorEnvelope
impl Send for ErrorEnvelope
impl Sync for ErrorEnvelope
impl Unpin for ErrorEnvelope
impl UnsafeUnpin for ErrorEnvelope
impl UnwindSafe for ErrorEnvelope
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