You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
ifresponse.status_code==200:
returnBeautifulSoup(response.text, 'html.parser')
else:
print(f"Failed to fetch jobs at start={start}: {response.status_code}, error: {response}")
returnNone
Additional Notes
This can lead to unexpected behavior and makes debugging difficult.
Activity