HTTP publisher fails when no head CID.
gammazero opened this issue · comments
Andrew Gillis commented
When an HTTP publisher is running and does not yet have a root/head CID to publish, a query for the root causes an internal server when the server fails to decode an undefined CID. To a client, this looks like a broken server, instead of one that just does not have content to advertise.
The better way to handle this is for the HTTP publisher to return a 204 No Content response.
This will allow clients to know exactly what the issue is. It will also help create tests because the HTTP publisher can be checked for responsiveness without having to update it with a root CID.