yada icon indicating copy to clipboard operation
yada copied to clipboard

Replace error-deferred for HEAD implementation

Open tggreene opened this issue 4 years ago • 0 comments

Currently we're creating deferred errors which are never consumed (these log exceptions when the next GC cycle runs), instead we can simply throw exceptions to be caught be the outer deferred chain and handled in the normal catch block in yada.handler/handle-request-with-maybe-subresources.

The only distinction from existing behaviour is that we will now return a 406 in line with GET when we have no available representation for the HEAD, whereas previously we would return a 200.

This aligns with the principle that the HEAD response should reflect the GET other than providing a response body.

This PR should address #206.

tggreene avatar Jan 22 '21 14:01 tggreene