LemmyNet / activitypub-federation-rust

High-level Rust library for the Activitypub protocol
GNU Affero General Public License v3.0
409 stars 46 forks source link

Webfinger: don't discard consumer errors #85

Closed sgued closed 9 months ago

sgued commented 9 months ago

Fix #83

Actually after looking at the code, it appears that the only time the consumer errors are actually discarded was when iterating over the links from a webfinger query. Since multiple links need to be tried there are multiple errors and it doesn't make much sense to return all of them.

Instead log the error so that it can be observed by the consumer of the library.

To resume:

This PR improves the webfinger error by:

Given that the inital issue is fixed just by adding a log line, it might make sense to drop this PR and make on that just adds the Display bound and the log line for simplicity.

Nutomic commented 9 months ago

Clippy has some complaints, otherwise looks good.