code: def test_request_exception(self, mock_post):
      mock_post.side_effect = RequestException
      ws = SerperDevWebSearch(api_key="some_invalid_key")
  
      with pytest.raises(SerperDevError):
          ws.run(query="Who is the boyfriend of Olivia Wilde?")
  
file_path: haystack/test/components/websearch/test_serperdev.py
imports: import os
  from unittest.mock import Mock, patch
  import pytest
  from requests import Timeout, RequestException, HTTPError
  from haystack import Document
  from haystack.components.websearch.serper_dev import SerperDevWebSearch, SerperDevError
label_desc: Use image node_id 5 for calling the TestSerperDevSearchAPI obj's underlying member method code with example usage: obj.test_request_exception(mock_post) without return types