code: def _handle_request_exception(request):
          
          try:
              data = request.json()
          except:
              data = {}
  
          code = request.status_code
          if code == requests.codes.bad:
              raise BadRequestException(response=data)
  
          if code == requests.codes.unauthorized:
              raise UnauthorizedException(response=data)
  
          if code == requests.codes.not_found:
              raise NotFoundException(response=data)
  
          # Generic error fallback
          request.raise_for_status()
docs: Raise the proper exception based on the response