Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deployer): split up deployer error enum #339

Merged
merged 2 commits into from
Sep 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: unsafe unwrap
  • Loading branch information
oddgrd committed Sep 16, 2022
commit 6a7b6ba6569add54ff0cce00f4f6f0d9dc571c4f
3 changes: 2 additions & 1 deletion deployer/src/handlers/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ impl Serialize for Error {
{
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("type", &format!("{:?}", self))?;
oddgrd marked this conversation as resolved.
Show resolved Hide resolved
map.serialize_entry("msg", &self.source().unwrap().to_string())?;
// use the error source if available, if not use display implementation
map.serialize_entry("msg", &self.source().unwrap_or(self).to_string())?;
map.end()
}
}
Expand Down