From ec6698f08a6ae95d12dc25079b2350dcb0e0313a Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Fri, 12 Feb 2021 10:35:49 +0100 Subject: [PATCH] cert plugin: propagate the error for non-existent cert 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 Reviewed-By: Alexander Bokovoy --- ipaserver/plugins/dogtag.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ipaserver/plugins/dogtag.py b/ipaserver/plugins/dogtag.py index d56f82af5..d1dbd7194 100644 --- a/ipaserver/plugins/dogtag.py +++ b/ipaserver/plugins/dogtag.py @@ -1471,6 +1471,7 @@ class ra(rabase.rabase, RestClient): except errors.HTTPRequestError as e: self.raise_certificate_operation_error( 'get_certificate', + err_msg=e.msg, detail=e.status # pylint: disable=no-member )