diff --git a/opcua-types/src/encoding.rs b/opcua-types/src/encoding.rs index 7bdd5acb..f81f9089 100644 --- a/opcua-types/src/encoding.rs +++ b/opcua-types/src/encoding.rs @@ -66,6 +66,12 @@ impl Display for Error { } } +impl StdError for Error { + fn source(&self) -> Option<&(dyn StdError + 'static)> { + Some(&*self.context) + } +} + impl Error { /// Create a new error with the specified `status` code and /// `context` as a dynamic error source.