Oddbean new post about | logout
 HTTP signatures 
Standard message payloads
Descriptive error messages

@e2bc32de @4eef68c5 
 @bfa30f49 @4eef68c5 "Descriptive error messages" is a new one for me. Give an example? 
 Just this: there are tons of ways that an API call can fail, but most Fediverse software just returns something unhelpful, like 500 Internal Server Error.

For production software, that’s probably reasonable, but a well-written test suite should help people debug, not just tell them about the bug.

So if I have a voice, a test suite should really return errors like: “this message was not accepted because it is missing a ‘name’ field.”

 @e2bc32de @4eef68c5 
 @bfa30f49 @4eef68c5 Right! Somewhere between returning error message payload in HTTP error responses, or logging things to the app's log or the system log, if it is reasonably easy to get at ... I agree! 
 Nomad returns delivery reports indicating the disposition of a message once it hits the server and let's normal people examine the reports for any message they send. We needed this years ago because Diaspora silently dropped 1/3 of all communications and we needed to be able to prove the issue wasn't our software's fault. The assumption was that site operators of that period were often high school kids that couldn't read or interpret log files, so this let us find federation issues without involving them. 

It would be no small feat getting this kind of thing standardised and adopted in ActivityPub, but we do provide feedback of the http error code for all sites -- and if something is stuck in the queue, one can see the results of the individual delivery attempts. Nomad sites provide much more detailed answers of what happened - lack of permission, filter/blocking rule, duplicate, recipient not found, delivered, etc... 
 @Mike Macgirvin (dev) @4eef68c5 pointer for more details? 
 @Mike Macgirvin (dev)

There was a discussion on error reporting on SocialHub forum: https://socialhub.activitypub.rocks/t/report-errors-in-server-processing/3006

I like the idea of using a special header to enable debug mode + generalized Accept/Reject activities for reporting.

@e2bc32de @4eef68c5  @bfa30f49