code: def raise_for_status(self):
          
          if 400 <= self.status_code < 600:
              message = 'Error %s for %s' % (self.status_code, self.url)
              raise HTTPError(message)
docs: Raises HTTPError if the request got an error.