lakeFS
lakeFS copied to clipboard
UploadObject returns 500 when "precondition fails"
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":"<>"}