pub struct MicroappError {
pub microapp_id: String,
pub kind: MicroappErrorKind,
pub correlation_id: Option<String>,
pub occurred_at: DateTime<Utc>,
pub summary: String,
pub stack_trace: Option<String>,
}Expand description
Notification payload.
Fields§
§microapp_id: StringOperator-facing extension id (extensions.yaml.entries.<id>).
kind: MicroappErrorKindDiscriminator for the four canonical error categories.
correlation_id: Option<String>JSON-RPC id that triggered the error, when applicable.
None for Exit (no in-flight call) and for boot-time
failures.
occurred_at: DateTime<Utc>UTC wall-clock at which the daemon observed the error.
summary: StringOne-line human-readable summary surfaced in the admin-ui
hover tooltip and Prometheus annotations. Keep terse —
stack trace goes in stack_trace.
stack_trace: Option<String>Optional multi-line stack trace / traceback. Bounded by the daemon’s stdio reader (16 KiB cap by convention) so a runaway microapp can’t blow up the broker.
Implementations§
Source§impl MicroappError
impl MicroappError
Sourcepub fn new(
microapp_id: impl Into<String>,
kind: MicroappErrorKind,
summary: impl Into<String>,
) -> Self
pub fn new( microapp_id: impl Into<String>, kind: MicroappErrorKind, summary: impl Into<String>, ) -> Self
Convenience: build a notification with Utc::now() as
the timestamp.
Sourcepub fn with_correlation_id(self, id: impl Into<String>) -> Self
pub fn with_correlation_id(self, id: impl Into<String>) -> Self
Set the JSON-RPC id correlation. Use the app:<uuid>
id when reporting failures of microapp-initiated outbound
calls.
Sourcepub fn with_stack_trace(self, trace: impl Into<String>) -> Self
pub fn with_stack_trace(self, trace: impl Into<String>) -> Self
Attach a multi-line stack trace. Daemon caps it at 16 KiB before broadcasting on the broker.
Trait Implementations§
Source§impl Clone for MicroappError
impl Clone for MicroappError
Source§fn clone(&self) -> MicroappError
fn clone(&self) -> MicroappError
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 MicroappError
impl Debug for MicroappError
Source§impl<'de> Deserialize<'de> for MicroappError
impl<'de> Deserialize<'de> for MicroappError
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 MicroappError
impl PartialEq for MicroappError
Source§fn eq(&self, other: &MicroappError) -> bool
fn eq(&self, other: &MicroappError) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for MicroappError
impl Serialize for MicroappError
Source§impl TS for MicroappError
impl TS for MicroappError
Source§type WithoutGenerics = MicroappError
type WithoutGenerics = MicroappError
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = MicroappError
type OptionInnerType = MicroappError
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read more