-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
ISSUE_NUMBER: GH-26
Description
The fetch_jobs_from_api function in linkedin.py prints an error message if the request fails, but it doesn't raise an exception.
File: repositories/jobflowapi/function/crawler/job_portals/linkedin.py
Line: 40
Severity: high
Current Behavior
Function prints an error message but continues execution when the API request fails.
Expected Behavior
Function should raise an exception to halt execution and prevent further errors when the API request fails.
Suggested Fix
Raise an exception in the else block when the API request fails.
Code Context
if response.status_code == 200:
return BeautifulSoup(response.text, 'html.parser')
else:
print(f"Failed to fetch jobs at start={start}: {response.status_code}, error: {response}")
return NoneAdditional Notes
This can lead to unexpected behavior and makes debugging difficult.
Reactions are currently unavailable