drf-problems
drf-problems copied to clipboard
Adds support for instance attribute and custom attributes
trafficstars
As I mentioned here https://github.com/shivanshs9/drf-problems/issues/10 I wasn't sure if there was already a way to do this, if there was never mind I guess.
example:
class Http400BadRequest(APIException):
status_code = status.HTTP_400_BAD_REQUEST
instance = "test/custom/thingy"
extensions = {"errors": "custom stuff", "more custom things": "asd"}
Are the changes fine? Can this be merged?