Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace error-deferred for HEAD implementation #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tggreene
Copy link

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.

Currently we're creating deferred errors which are never consumed (these log
exceptions when the next GC cycle runs), instead we can simply throw 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant