From: Yehuda Sadeh Date: Mon, 20 Apr 2015 22:01:34 +0000 (-0700) Subject: rgw: adjust return code if can't find upload X-Git-Tag: v9.0.1~98^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F4408%2Fhead;p=ceph.git rgw: adjust return code if can't find upload Fixes: #11436 Return NoSuchUpload (instead of NoSuchKey). Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 1ab9049f084..ddd27b0497c 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -2806,8 +2806,12 @@ static int get_multipart_info(RGWRados *store, struct req_state *s, string& meta obj.set_in_extra_data(true); int ret = get_obj_attrs(store, s, obj, attrs); - if (ret < 0) + if (ret < 0) { + if (ret == -ENOENT) { + return -ERR_NO_SUCH_UPLOAD; + } return ret; + } if (policy) { for (iter = attrs.begin(); iter != attrs.end(); ++iter) {