-
Notifications
You must be signed in to change notification settings - Fork 47
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
Precedence of response codes #146
Comments
Hmm good question. So, I think given #128 (comment) my understand is that, this should happen:
There wouldn't be a 409 but the possibility of /test-put-bc/dahut-bc.ttl/ getting created as a container. That might just mean that 412 will kick in. Let's make sure to identify other situations where multiple error codes may be applicable. For instance, authn/z based errors (or hiding sensitive information eg. via 404) should (probably must) precede other kind of errors. So, we can start by ordering error categories. Edit: I think we should eliminate situations where an implementation needs to choose a response code at random or based on its preferences - as much as possible. There should be a clear decision path. |
Would it make sense to reframe this issue to "Precedence of response codes"? It is not entirely about errors as this example shows #107 (comment) :
So, in that case if 403 is applicable, it should happen. |
Revisiting this issue with specifics to the example in #146 (comment) based on current spec: Server will ignore the Link header because the slash semantics determine the type of resource. Only in the case of server assigning the URI of a container via POST the Link header with a LDP container type will be used. 409 can only happen with respect to https://tools.ietf.org/html/rfc7232#section-5 :
eg. changing the identity of the resource, which may the case for instance if the representation body included Besides such cases, server will return 412. |
This will be important as we write tests, so I suggest we prioritize it. It is also related to #288 . It might be sensible to leave some variability here though, that there is no precedence. If that is the conclusion, clients, including tests, will need to consider several error scenarios. It might work out fine. |
Consider, for example the request:
If the resource already exists, there are two different reasons why this request should fail:
409
becauseldp:BasicContainer
is inconsistent with that the request URI does not end with a/
.412
because it failed the precondition set by theIf-None-Match: *
header.In such cases, should we express what should be checked first, IOW, what error message the client should see in every case, or should we leave that up to implementations?
The text was updated successfully, but these errors were encountered: