{ ERR_NOT_FOUND, {404, "Not Found"}},
{ ERR_NO_SUCH_LC, {404, "NoSuchLifecycleConfiguration"}},
{ ERR_NO_SUCH_BUCKET_POLICY, {404, "NoSuchBucketPolicy"}},
+ { ERR_NO_SUCH_USER, {404, "NoSuchUser"}},
{ ERR_NO_SUCH_SUBUSER, {404, "NoSuchSubUser"}},
{ ERR_METHOD_NOT_ALLOWED, {405, "MethodNotAllowed" }},
{ ETIMEDOUT, {408, "RequestTimeout" }},
return ret;
if (!op_state.has_existing_user())
- return -ENOENT;
+ return -ERR_NO_SUCH_USER;
Formatter *formatter = flusher.get_formatter();
Formatter *formatter = flusher.get_formatter();
ret = user.modify(op_state, NULL);
- if (ret < 0)
+ if (ret < 0) {
+ if (ret == -ENOENT)
+ ret = -ERR_NO_SUCH_USER;
return ret;
+ }
ret = user.info(info, NULL);
if (ret < 0)
ret = user.remove(op_state, NULL);
+ if (ret == -ENOENT)
+ ret = -ERR_NO_SUCH_USER;
return ret;
}
if (ret < 0)
return ret;
+ if (!op_state.has_existing_user())
+ return -ERR_NO_SUCH_USER;
+
Formatter *formatter = flusher.get_formatter();
ret = user.subusers.add(op_state, NULL);
if (ret < 0)
return ret;
+ if (!op_state.has_existing_user())
+ return -ERR_NO_SUCH_USER;
+
Formatter *formatter = flusher.get_formatter();
ret = user.subusers.modify(op_state, NULL);
return ret;
+ if (!op_state.has_existing_user())
+ return -ERR_NO_SUCH_USER;
+
ret = user.subusers.remove(op_state, NULL);
if (ret < 0)
return ret;
if (ret < 0)
return ret;
+ if (!op_state.has_existing_user())
+ return -ERR_NO_SUCH_USER;
+
Formatter *formatter = flusher.get_formatter();
ret = user.keys.add(op_state, NULL);
if (ret < 0)
return ret;
+ if (!op_state.has_existing_user())
+ return -ERR_NO_SUCH_USER;
+
ret = user.keys.remove(op_state, NULL);
if (ret < 0)
if (ret < 0)
return ret;
+ if (!op_state.has_existing_user())
+ return -ERR_NO_SUCH_USER;
+
Formatter *formatter = flusher.get_formatter();
ret = user.caps.add(op_state, NULL);
if (ret < 0)
return ret;
+ if (!op_state.has_existing_user())
+ return -ERR_NO_SUCH_USER;
+
Formatter *formatter = flusher.get_formatter();
ret = user.caps.remove(op_state, NULL);