lakeFS
lakeFS copied to clipboard
Bug: UploadObject with `if-none-match` returns 500 instead of 412
If the object exists, the returned response to the client is 500 instead of 412. At this line we check for graveler.ErrPreconditionFailed, but the code returns kv.ErrPreconditionFailed.
An error log from v0.102.2 that returns 500:
log | {"error":"predicate failed","file":"build/pkg/api/controller.go:2069","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":"2023-06-20T20:12:59Z","user":"<USER>"}
This issue is now marked as stale after 90 days of inactivity, and will be closed soon. To keep it, mark it with the "no stale" label.