      default_code = 'throttled'
  
      def __init__(self, wait=None, detail=None, code=None):
          super(Throttled, self).__init__(detail, code)
 
</s> remove from rest_framework.exceptions import ErrorDetail, _get_error_details
 </s> add from rest_framework.exceptions import (
    ErrorDetail, Throttled, _get_error_details
) </s> remove 
        if wait is None:
            self.wait = None
        else:
            self.wait = math.ceil(wait)
            self.detail += ' ' + force_text(ungettext(
                self.extra_detail_singular.format(wait=self.wait),
                self.extra_detail_plural.format(wait=self.wait),
                self.wait
            ))
 </s> add 
        if detail is None:
            detail = force_text(self.default_detail)
        if wait is not None:
            wait = math.ceil(wait)
            detail = ' '.join((
                detail,
                force_text(ungettext(self.extra_detail_singular.format(wait=wait),
                                     self.extra_detail_plural.format(wait=wait),
                                     wait))))
        self.wait = wait
      default_code = 'throttled'
  
      def __init__(self, wait=None, detail=None, code=None):
        if detail is None:
            detail = force_text(self.default_detail)
        if wait is not None:
            wait = math.ceil(wait)
            detail = ' '.join((
                detail,
                force_text(ungettext(self.extra_detail_singular.format(wait=wait),
                                     self.extra_detail_plural.format(wait=wait),
                                     wait))))
        self.wait = wait
          super(Throttled, self).__init__(detail, code)
keep keep add keep
 Fix support of get_full_details() for Throttled exceptions (#4627)

Since `str` objects are immutable, appending to existing `str` creates
in fact a new `str` instance.

Thus `ErrorDetail.detail.code` attribute is lost after `str` concatenation operation. 
rest_framework/exceptions.py