Skip to content

Commit

Permalink
fix(plugin): API msg field plugin error
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Nov 18, 2022
1 parent cf6fc6a commit 9aa0915
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::fmt;
pub struct PluginError {
code: i32,
#[serde(rename = "message")]
mgs: String,
msg: String,
data: Option<serde_json::Value>,
}

Expand All @@ -20,14 +20,14 @@ impl PluginError {
{
return PluginError {
code,
mgs: msg.to_string(),
msg: msg.to_string(),
data: data.to_owned(),
};
}
}

impl fmt::Display for PluginError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "code: {}, msg: {}", self.code, self.mgs,)
write!(f, "code: {}, msg: {}", self.code, self.msg)
}
}

0 comments on commit 9aa0915

Please sign in to comment.