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

This commit is contained in:
Lucas Fernandes Nogueira
2023-12-18 15:01:47 -03:00
committed by GitHub
parent 68cb23f9c0
commit 2d6bfbfacf
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"fs": patch
---
Fix promise rejection error only containing the context and stripping the actual error message.
+5 -1
View File
@@ -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())
}
}
}