from rest_framework import status
from rest_framework.response import Response
-from catalog.pub.exceptions import CatalogException
+from catalog.pub.exceptions import CatalogException, SubscriptionDoesNotExistsException
from catalog.pub.exceptions import BadRequestException
from catalog.pub.exceptions import NsdmBadRequestException
from catalog.pub.exceptions import PackageNotFoundException
detail=e.args[0],
status=status.HTTP_400_BAD_REQUEST
)
+ except SubscriptionDoesNotExistsException as e:
+ logger.error(e.args[0])
+ return make_error_resp(
+ detail=e.args[0],
+ status=status.HTTP_404_NOT_FOUND
+ )
except VnfPkgSubscriptionException as e:
logger.error(e.args[0])
return make_error_resp(
detail='Unexpected exception',
status=status.HTTP_500_INTERNAL_SERVER_ERROR
)
+
return wrapper
+
return view_safe_call