snarfed / bridgy-fed

🌉 A bridge between decentralized social network protocols
https://fed.brid.gy
Creative Commons Zero v1.0 Universal
726 stars 39 forks source link

Better error response for non-compliant accounts? #1466

Closed edent closed 1 week ago

edent commented 1 week ago

I was unable to receive a follow from the AP-Bsky bridge.

When I finally read the documentation I saw that my account wasn't yet 2 weeks old. I fixed that, and it worked.

However, the response I received to my initial follow request was:

Added receive task projects/bridgy-federated/locations/us-central1/queues/receive/tasks/26081956632065569231
delay None
b'as2={"@context":"https://www.w3.org/ns/activitystreams","actor":"..."
&received_at=2024-11-11T08:43:46.403643+00:00&source_protocol=activitypub'

(Truncated for clarity)

Would it be possible / sensible to add an error message to that response explaining the problem?

snarfed commented 1 week ago

Hi Terence, good to see you here! Absolutely, this is a good idea. I think we're tracking this as #758, would that work for you?

edent commented 1 week ago

@snarfed 👋

In my case, no. Because I haven't written the code to read DMs 🤣

But, in general, yes.

Tamschi commented 1 week ago

I think this is distinct enough to track it separately. (There's probably not much overlap in the eventual message compared to #758.)

snarfed commented 1 week ago

The catch is, the "error response" here is an internal log message that you only see if you click through from your user page on https://fed.brid.gy/ . Exposing logs publicly has been useful, but also confusing and flaky. I've added a few band-aids here and there, but making it actually reliable and useful would take distributed tracing across the backend infrastructure, which would be a big project that realistically I doubt I'd prioritize. If anything, I'd just remove the logs altogether.

Previously: https://github.com/snarfed/bridgy-fed/issues/620, https://github.com/snarfed/bridgy-fed/issues/541, etc

edent commented 1 week ago

Fair enough. I can accept that I'm a niche 😄

Tamschi commented 1 week ago

I'll merge this into #758, in that case.