pybind/mgr: add additional decorators for mgr response handling
Add a ErrorResponseHandler decorator for catching and automatically
handling ErrorResponseBase exceptions like Responder does but it *only*
handles exceptions. Normal return value tuples are passed on to the mgr.
Add a EmptyResponder decorator that catches errors but returns "empty"
strings as a response to the mgr. This matches a number of preexisting
functions that don't return json or any other value on success.
Both these decorators are added in order to match behaviors of Responder
decorator without opting into auto formatted responses wholesale. They
are intended to be used when converting older apis to use object_format
module.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit
a41678a4c700867ba23a299eeafdad23b6840bd0)