return Response(data=resp_serializer.data, status=status.HTTP_200_OK)
except Exception as e:
logger.error(traceback.format_exc())
- logger.error("Exception in GetPnf: %s", e.message)
- return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+ logger.error("Exception in GetPnf: %s", e.args[0])
+ return Response(data={'error': e.args[0]}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
class IndividualPnfView(APIView):
return Response(data={}, status=status.HTTP_204_NO_CONTENT)
except Exception as e:
logger.error(traceback.format_exc())
- logger.error("Exception in delete pnf: %s", e.message)
- return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+ logger.error("Exception in delete pnf: %s", e.args[0])
+ return Response(data={'error': e.args[0]}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
@swagger_auto_schema(
request_body=None,
return Response(data=resp_serializer.data, status=status.HTTP_200_OK)
except Exception as e:
logger.error(traceback.format_exc())
- logger.error("Exception in IndividualPnfView: %s", e.message)
- return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+ logger.error("Exception in IndividualPnfView: %s", e.args[0])
+ return Response(data={'error': e.args[0]}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)