feat(fs): include full error message (#826)

pull/834/head
Lucas Fernandes Nogueira 1 year ago committed by GitHub
parent 68cb23f9c0
commit 2d6bfbfacf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,5 @@
---
"fs": patch
---
Fix promise rejection error only containing the context and stripping the actual error message.

@ -36,7 +36,11 @@ impl Serialize for CommandError {
where
S: Serializer,
{
serializer.serialize_str(self.to_string().as_ref())
if let Self::Anyhow(err) = self {
serializer.serialize_str(format!("{err:#}").as_ref())
} else {
serializer.serialize_str(self.to_string().as_ref())
}
}
}

Loading…
Cancel
Save