fediverse-devnet / feditest

A testing framework for distributed, heterogeneous systems communicating with complex protocols, such as the Fediverse
https://feditest.org/
MIT License
27 stars 4 forks source link

Fix imp api #163

Closed jernst closed 1 month ago

jernst commented 1 month ago
steve-bate commented 1 month ago
  • This is probably what a good library would do, so that the code invoking the library could report errors nicely.

I don't think that most Fediverse WebFinger implementations are built as a library (based on the code I've observed). I'd expect that they will typically raise an exception or implement some app-specific handling if a WebFinger response is invalid for some reason that's significant to that specific app. Some invalid responses will be commonly accepted in non-fixture clients. For example, I'd guess that most apps accept application/json as a content type for WebFinger responses. I'd guess the same for extra nonstandard keys in the WebFinger JRD.

EDIT: Just to be clear, I think this is a reasonable approach for the "Imp" given its role.