Salta al contenuto principale


One problem with ActivityPub is that there is not a standard format for errors returned from the API or federation protocol.

I wrote a Fediverse Enhancement Proposal (FEP) to establish a standard set of error messages using RFC 9457, Problem Details for HTTP APIs.

It'd be great to get some review here:

codeberg.org/fediverse/fep/src…

Comments and suggestions here (or just reply):

codeberg.org/evanp/fep/issues

..

reshared this

in reply to Evan Prodromou

@mnot I'm especially interested in your thoughts on the matter! I think this proposal would add many, many more problem types than already exist to the registry.
in reply to Evan Prodromou

looks pretty straightforward to me. Maybe some optional response fields for

UnsupportedType (optional reply fields for supported object/activity types)

UnsupportedMediaType (optional reply fields for what is supported)

MediaTooLarge (optional reply fields for acceptable size).

in reply to Evan Prodromou

I don’t know if you’re aware, but both those links give a 500 error
in reply to Nick Ludlam

@nick Yeah, weird!

status.codeberg.org/status/cod…

in reply to Evan Prodromou

codeberg is now 500ing, so I'm going to assume its from excitement about this new FEP.
in reply to irelephant

@irelephant 🙁

status.codeberg.org/status/cod…

in reply to Evan Prodromou

Only quick read-through and don't know much about activity pub, so take my thoughts with a bunch of salt:

media too large and size field implies to me the server has to read the file even though it's already been concluded it's too large. This seems a bit iffy to me, also wondering if it's a potential attack vector if you're not careful on the server side?

Does redundant activity work better with status 409 conflict?

Questa voce è stata modificata (2 settimane fa)
in reply to Evan Prodromou

I am not familiar with the AP protocol, but I used and wrote my fair share of APIs, and what I am wondering is this: why not use 409 for redundancy (in general I would classify it as a conflict, but maybe it doesn’t work like that in AP’s terms) and not 404 for object doesn’t exist?
in reply to Gabor Pihaj

404 would mean that the endpoint that you're posting to does not exist.

"Note that this type is distinct from an endpoint returning a 404 Not Found status code for a GET request for an object that does not exist, or for posting to an endpoint that does not exist."

409 is probably fine to use there.

Questa voce è stata modificata (2 settimane fa)