Repository navigation
describe how validation errors are returned from the batch api - #599
Conversation
There was a problem hiding this comment.
Sorry, previous comment based on diff but didn't apply once I'd expanded it (talking about download not upload). Should this paragraph specifically identify that this applies to the 'download' case?
There was a problem hiding this comment.
Also, a similar response can happen for upload but for different reasons, i.e. if the object already exists.
Maybe this should be in a separate section headed '200 partial responses' and give examples for valid cases for download & upload.
There was a problem hiding this comment.
I like the idea of splitting out a separate section for 200 partial responses. 👍
IMO, a request to upload an existing file is not an error. The object should have no error and no actions set on it. The lack of an upload action means the client can skip it.
I think in previous API versions, the server returned a download action on existing objects instead. I don't think the client even bothers to check this though.
There was a problem hiding this comment.
IMO, a request to upload an existing file is not an error. The object should have no error and no actions set on it. The lack of an upload action means the client can skip it.
100% agree, when I said 'a similar response' I meant a missing upload entry for the object in the response, sorry for the ambiguity.
I think in previous API versions, the server returned a download action on existing objects instead. I don't think the client even bothers to check this though.
Yeah, and I've mirrored that in test servers I've built too :) But that's because the old API didn't have an intended operation; leaving the object out seems more consistent.
|
Rewrote how we present the responses in the spec. It now shows the various possible responses: successful, partial error, validation error, 403, 401, etc. I also added a new header for 401 responses: |
|
👍 |
There was a problem hiding this comment.
Should this be "Servers can also set an upper bound"? I don't think an upper bound would be commonplace for self-hosting, only when you're providing hosting for other people.
There was a problem hiding this comment.
I was purposely trying to use one of the rfc conformance words. Though after looking at the RFC for the RFC conformance words, I think you're right:
SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.MAY This word, or the adjective "OPTIONAL", mean that an item is
truly optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels that
it enhances the product while another vendor may omit the same item.
An implementation which does not include a particular option MUST be
prepared to interoperate with another implementation which does
include the option, though perhaps with reduced functionality. In the
same vein an implementation which does include a particular option
MUST be prepared to interoperate with another implementation which
does not include the option (except, of course, for the feature the
option provides.)
|
Looks good, just one tiny comment on the docs. |
describe how validation errors are returned from the batch api
Updates the batch API spec to match #597.