lakeFS icon indicating copy to clipboard operation
lakeFS copied to clipboard

UploadObject returns 500 when "precondition fails"

Open itaiad200 opened this issue 1 year ago • 3 comments

ErrPredicateFailed is not handled in the api controller. Not sure if by design or not. When kv returns the error ErrPredicateFailed it propagates to the api and 500 is returned to the client.

Example log:

log | {"error":"predicate failed","file":"build/pkg/api/controller.go:2104","func":"pkg/api.(*Controller).handleAPIErrorCallback","host":"******","level":"error","method":"POST","msg":"API call returned status internal server error","operation_id":"UploadObject","path":"/api/v1/repositories/<repo>/branches/<branch>/objects?path=<path>","request_id":"<>","service":"api_gateway","service_name":"rest_api","time":"<>","user":"<>"}

itaiad200 avatar Aug 22 '23 08:08 itaiad200