diff --git a/caikit_nlp/toolkit/text_generation/tgis_utils.py b/caikit_nlp/toolkit/text_generation/tgis_utils.py index 724773ed..d8988ce7 100644 --- a/caikit_nlp/toolkit/text_generation/tgis_utils.py +++ b/caikit_nlp/toolkit/text_generation/tgis_utils.py @@ -485,8 +485,7 @@ def unary_generate( raise CaikitCoreException( caikit_status_code, INACTIVE_RPC_CONN_ERR_MESSAGE ) from err - else: - raise CaikitCoreException(caikit_status_code, details) from err + raise CaikitCoreException(caikit_status_code, details) from err except grpc.RpcError as err: raise_caikit_core_exception(err) @@ -676,8 +675,7 @@ def stream_generate( raise CaikitCoreException( caikit_status_code, INACTIVE_RPC_CONN_ERR_MESSAGE ) from err - else: - raise CaikitCoreException(caikit_status_code, details) from err + raise CaikitCoreException(caikit_status_code, details) from err except grpc.RpcError as err: raise_caikit_core_exception(err)