Report errors in server processing

Following the discussion in fediverse-ideas issue #55, I’d like to further expand on the idea expressed in my previous post:

POST: https://moebius.band/inbox
X-ActivityPub-Request-Id: 123xyz

The well-known endpoint is not actually needed. Instead, if activity is processed asynchronously, the recepient should return a response with status 202 Accepted and X-ActivityPub-Response-Id header. The value of this header is the ID of a special Acknowledge activity (I think the difference between the standard Accept activity and developer reports is big enough to justify a new type):

X-ActivityPub-Response-Id: https://moebius.band/acks/123xyz

Here’s an example of Acknowledge activity:

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/fep/xxxx/Acknowledge"
  ],
  "type": "Acknowledge",
  "actor": "https://moebius.band/actor",
  "id": "https://moebius.band/acks/123xyz",
  "content": "200 OK",
}

The value of content property is a HTTP status that would be returned if server processed activity synchronously.

Additional properties can be added if a more detailed report is required, for example result.

1 Like