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 None
Additional Notes
This can lead to unexpected behavior and makes debugging difficult.
ISSUE_NUMBER: GH-26
Description
The
fetch_jobs_from_apifunction inlinkedin.pyprints an error message if the request fails, but it doesn't raise an exception.File:
repositories/jobflowapi/function/crawler/job_portals/linkedin.pyLine: 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
elseblock when the API request fails.Code Context
Additional Notes
This can lead to unexpected behavior and makes debugging difficult.