Matty-Sam commited on
Commit
8589303
·
verified ·
1 Parent(s): 1545cd3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,7 +47,7 @@ def search_for_books(author: str = '', title: str = '') -> str:
47
  return 'Must provide at least one of author or title.'
48
 
49
  try:
50
- search_terms = ' '.join(author, title)
51
  params = {"search": search_terms}
52
  base_url = 'https://gutendex.com/books'
53
  response = requests.get(base_url, params=params)
@@ -71,7 +71,7 @@ def search_for_books(author: str = '', title: str = '') -> str:
71
  return results
72
 
73
  except Exception as e:
74
- return f"There was an error with function search_for_books"
75
 
76
 
77
 
 
47
  return 'Must provide at least one of author or title.'
48
 
49
  try:
50
+ search_terms = ' '.join([author, title])
51
  params = {"search": search_terms}
52
  base_url = 'https://gutendex.com/books'
53
  response = requests.get(base_url, params=params)
 
71
  return results
72
 
73
  except Exception as e:
74
+ raise e
75
 
76
 
77