diff --git a/fm-rest-api/fm/fm/api/controllers/v1/utils.py b/fm-rest-api/fm/fm/api/controllers/v1/utils.py index fadbea68..873fde00 100644 --- a/fm-rest-api/fm/fm/api/controllers/v1/utils.py +++ b/fm-rest-api/fm/fm/api/controllers/v1/utils.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018-2021 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -10,6 +10,7 @@ import contextlib import traceback import pecan import wsme +from cgtsclient import exc from oslo_config import cfg from oslo_log import log from oslo_utils import uuidutils @@ -112,6 +113,10 @@ def replace_name_with_uuid(instance_id): except exceptions.ServerNotFound: LOG.error("Can't find the port for name %s", value) pass + except exc.HTTPException as http_exc: + msg = "Http request failed with code {}" + LOG.error(msg.format(http_exc.code)) + pass if port: new_id = key + KEY_VALUE_SEP + port.uuid