github.com/cs3org/reva/v2@v2.27.7/changelog/2.6.1_2022-06-27/preconditionfailed-vs-aborted.md (about) 1 Enhancement: distinguish GRPC FAILED_PRECONDITION and ABORTED codes 2 3 Webdav distinguishes between 412 precondition failed for if match errors for locks or etags, uses 405 Method Not Allowed when trying to MKCOL an already existing collection and 409 Conflict when intermediate collections are missing. 4 5 The CS3 GRPC status codes are modeled after https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto. When trying to use the error codes to distinguish these cases on a storageprovider CreateDir call we can map ALREADY_EXISTS to 405, FAILED_PRECONDITION to 409 and ABORTED to 412. 6 7 Unfortunately, we currently use and map FAILED_PRECONDITION to 412. I assume, because the naming is very similar to PreconditionFailed. However the GRPC docs are very clear that ABORTED should be used, specifically mentioning etags and locks. 8 9 With this PR we internally clean up the usage in the decomposedfs and mapping in the ocdav handler. 10 11 https://github.com/cs3org/reva/pull/3003 12 https://github.com/cs3org/reva/pull/3010