[foods] Fix bug in exception handling
This commit is contained in:
@ -51,7 +51,7 @@ class RecipeScraperService:
|
|||||||
def scrape_url(self, url: str):
|
def scrape_url(self, url: str):
|
||||||
response = self.session.get(url)
|
response = self.session.get(url)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
raise Exception("Recipe website returned non 200 response", e)
|
raise Exception("Recipe website returned non 200 response")
|
||||||
return self.scrape(response.text, org_url=url)
|
return self.scrape(response.text, org_url=url)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user