Closed cetra3 closed 1 year ago
This seems very tricky because anyhow is used for the library to wrap LemmyError which itself uses anyhow. I have nothing against such a change as long as it works with Lemmy, maybe by putting anyhow behind a feature flag?
You might be right, we might be able to coax the error into an anyhow::Error
. I'll see how far I get & make sure lemmy compat isn't broken
I'm trying to use
eyre
with this crate and getting some really gnarly generic trait bound errors. It appears it's because functions likereceive_activity
and the like are coupled to ensuring that something can implement theanyhow::Error
type.I propose we should refactor this out, and rely solely on
thiserror
for errors within this crate and provide some way of bringing your own errors for library consumers.Let me know if you're open to this and I can have a crack