import logging
import traceback
+from drf_yasg import openapi
from drf_yasg.utils import swagger_auto_schema
from rest_framework import status
from rest_framework.response import Response
class JobView(APIView):
@swagger_auto_schema(
- request_body=None,
+ manual_parameters=[
+ openapi.Parameter('responseId',
+ openapi.IN_QUERY,
+ "responseId",
+ type=openapi.TYPE_INTEGER
+ ),
+ ],
responses={
status.HTTP_200_OK: JobQueryRespSerializer(),
status.HTTP_500_INTERNAL_SERVER_ERROR: "Internal error"
return Response(data=resp_serializer.data, status=status.HTTP_200_OK)
except Exception as e:
logger.error(traceback.format_exc())
- return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+ return Response(data={'error': e.args[0]}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)