diff options
author | Adam C. Emerson <aemerson@redhat.com> | 2022-12-13 22:15:24 +0100 |
---|---|---|
committer | Adam C. Emerson <aemerson@redhat.com> | 2022-12-13 22:41:52 +0100 |
commit | 0b0fd44f42575c89ccce375b06c0db1d50c48ce6 (patch) | |
tree | cf07fc992b814cd21ebb1394d03842c7647bcd12 /src/rgw/rgw_rest_user_policy.cc | |
parent | rgw: Add `rgw_policy_reject_invalid_principals` and messages (diff) | |
download | ceph-0b0fd44f42575c89ccce375b06c0db1d50c48ce6.tar.xz ceph-0b0fd44f42575c89ccce375b06c0db1d50c48ce6.zip |
rgw: Put useful policy error messages in error document
This affects the various create/put operations that take a policy document.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Diffstat (limited to 'src/rgw/rgw_rest_user_policy.cc')
-rw-r--r-- | src/rgw/rgw_rest_user_policy.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rgw/rgw_rest_user_policy.cc b/src/rgw/rgw_rest_user_policy.cc index ea56ddd94bb..1d693d9c0f5 100644 --- a/src/rgw/rgw_rest_user_policy.cc +++ b/src/rgw/rgw_rest_user_policy.cc @@ -162,7 +162,8 @@ void RGWPutUserPolicy::execute(optional_yield y) ldpp_dout(this, 0) << "ERROR: failed to decode user policies" << dendl; op_ret = -EIO; } catch (rgw::IAM::PolicyParseException& e) { - ldpp_dout(this, 20) << "failed to parse policy: " << e.what() << dendl; + ldpp_dout(this, 5) << "failed to parse policy: " << e.what() << dendl; + s->err.message = e.what(); op_ret = -ERR_MALFORMED_DOC; } |