X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=catalog%2Fpackages%2Fviews%2Fcommon.py;h=e902f578481b4a5c307bc07ed3d9ca15975b668e;hb=4005f05cbf5be14ad89a8c3da89d7d905b6b9a7a;hp=f7e3f70871d09cd0f7f05942139dce7b0a52a147;hpb=f5a0353d4127f32ebc95012b24f344b858ceec3a;p=vfc%2Fnfvo%2Fcatalog.git diff --git a/catalog/packages/views/common.py b/catalog/packages/views/common.py index f7e3f708..e902f578 100644 --- a/catalog/packages/views/common.py +++ b/catalog/packages/views/common.py @@ -22,6 +22,7 @@ from catalog.pub.exceptions import CatalogException from catalog.pub.exceptions import NsdmBadRequestException from catalog.pub.exceptions import PackageNotFoundException from catalog.pub.exceptions import ResourceNotFoundException +from catalog.pub.exceptions import ArtifactNotFoundException logger = logging.getLogger(__name__) @@ -65,6 +66,12 @@ def view_safe_call_with_log(logger): detail=e.message, status=status.HTTP_404_NOT_FOUND ) + except ArtifactNotFoundException as e: + logger.error(e.message) + return make_error_resp( + detail=e.message, + status=status.HTTP_404_NOT_FOUND + ) except NsdmBadRequestException as e: logger.error(e.message) return make_error_resp(