Skip to content

Commit

Permalink
cert plugin: propagate the error for non-existent cert
Browse files Browse the repository at this point in the history
ipa cert-show, ipa cert-revoke and ipa cert-remove-hold do not
print meaningful info when called on a non-existent cert id:
Certificate operation cannot be completed: Unable to communicate
with CMS

Propagate the reason from the HTTP message in order to print
'Certificate ID 0x.. not found'

Fixes: https://pagure.io/freeipa/issue/8704
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
  • Loading branch information
flo-renaud committed Feb 12, 2021
1 parent 46b0746 commit ec6698f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ipaserver/plugins/dogtag.py
Expand Up @@ -1471,6 +1471,7 @@ def get_certificate(self, serial_number):
except errors.HTTPRequestError as e:
self.raise_certificate_operation_error(
'get_certificate',
err_msg=e.msg,
detail=e.status # pylint: disable=no-member
)

Expand Down

0 comments on commit ec6698f

Please sign in to comment.