docs: def _get_error_response(self, exc):
          """ Generate HttpResponse based on the HttpStatusCodeError. """
          if exc.has_code(codes.UNAUTHORIZED):
              return self._get_auth_challenge(exc)
          else:
              if exc.has_code(codes.INTERNAL_SERVER_ERROR):
                  logging.getLogger('devil').error('devil caught http error: ' + str(exc), exc_info=True)
              else:
                  logging.getLogger('devil').error('devil caught http error: ' + str(exc))
              content = exc.content or ''
              return HttpResponse(content=content, status=exc.get_code_num())