MCPcopy Index your code
hub / github.com/encode/django-rest-framework / __init__

Method __init__

rest_framework/exceptions.py:108–114  ·  view source on GitHub ↗
(self, detail=None, code=None)

Source from the content-addressed store, hash-verified

106 default_code = 'error'
107
108 def __init__(self, detail=None, code=None):
109 if detail is None:
110 detail = self.default_detail
111 if code is None:
112 code = self.default_code
113
114 self.detail = _get_error_details(detail, code)
115
116 def __str__(self):
117 return str(self.detail)

Callers

nothing calls this directly

Calls 1

_get_error_detailsFunction · 0.85

Tested by

no test coverage detected