#[non_exhaustive]pub struct ErrorRecord {
pub code: String,
pub message: String,
pub path: Option<String>,
pub workflow_id: Option<Arc<str>>,
pub task_id: Option<Arc<str>>,
pub timestamp: Option<Arc<str>>,
pub detail: Option<String>,
pub element_index: Option<usize>,
pub cause: Option<Arc<ExprCause>>,
pub site: Option<Arc<ErrorSite>>,
}Expand description
One error record, written as v3 wrote one: the same keys, in the same order, each optional one absent when unset. The engine stamps every record a task adds with the workflow’s and the task’s ids and the run’s timestamp, keeping any the record already carries; a workflow’s own failure carries no task id.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: StringThe error code.
message: StringThe human-readable message.
path: Option<String>Where the error happened; null when not known, and never absent.
workflow_id: Option<Arc<str>>The workflow it happened in, shared with the program’s own id and the audit entry’s, so a run allocates it once.
task_id: Option<Arc<str>>The task it happened in, shared as workflow_id is.
timestamp: Option<Arc<str>>When it happened, shared with every record of the run.
detail: Option<String>Operator-only detail; never to be shown to an untrusted caller.
element_index: Option<usize>The fan-out element the error came from.
cause: Option<Arc<ExprCause>>Structured expression diagnostics, carried in-memory for host reports and omitted from the sanitized wire representation.
site: Option<Arc<ErrorSite>>Where in the workflow the error happened, carried in-memory for host reports and omitted from the sanitized wire representation.
Implementations§
Source§impl ErrorRecord
impl ErrorRecord
Sourcepub fn new(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn new(code: impl Into<String>, message: impl Into<String>) -> Self
A record with a code and a message and nothing else.
Sourcepub fn cause(&self) -> Option<&ExprCause>
pub fn cause(&self) -> Option<&ExprCause>
Structured expression diagnostics, when this record came from an expression or a budget failure.
Sourcepub fn with_cause(self, cause: ExprCause) -> Self
pub fn with_cause(self, cause: ExprCause) -> Self
Attaches structured expression diagnostics to this record.
Trait Implementations§
Source§impl Clone for ErrorRecord
impl Clone for ErrorRecord
Source§impl Debug for ErrorRecord
impl Debug for ErrorRecord
Source§impl<'de> Deserialize<'de> for ErrorRecord
impl<'de> Deserialize<'de> for ErrorRecord
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>,
impl Eq for ErrorRecord
Source§impl From<&Error> for ErrorRecord
impl From<&Error> for ErrorRecord
Source§impl PartialEq for ErrorRecord
impl PartialEq for ErrorRecord
Auto Trait Implementations§
impl Freeze for ErrorRecord
impl RefUnwindSafe for ErrorRecord
impl Send for ErrorRecord
impl Sync for ErrorRecord
impl Unpin for ErrorRecord
impl UnsafeUnpin for ErrorRecord
impl UnwindSafe for ErrorRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.