Download How to return custom status code via DRF? - Stack Overflow book pdf free download link or read online here in PDF. Read online How to return custom status code via DRF? - Stack Overflow book pdf free download link book now. All books are in clear copy here, and all files are secure so don't worry about it. This site is like a library, you could find million book here by using search box in the header.
I think you can capture the Validation Error and then make a custom response with the status you want (202 in this case). I haven't tried it but this may work: if (serializer.is_valid(raise_exception=True)): serializer.save() return Response(serializer.data, status=status.HTTP_201_CREATED) except ValidationError as msg:
Read : How to return custom status code via DRF? - Stack Overflow pdf book online Select one of servers for direct link: |
---|