Learning-Python-Team / Learning-Python-Team/UnTruth

Handle Exceptions

Open
#17 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
3
Forks
6
PR merge metrics
No merged PRs in 30d

Description

The program returns lines of errors when websites that aren't supported by newspaper library is entered as news_url

AttributeError is thrown when websites like 'google.com' are entered in the url. Its better we give a more reasonable error to the user by placing that code inside a try except block

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the code that processes the news_url input and reproduce the failure with an unsupported site such as google.com. Trace the AttributeError and add handling so unsupported websites produce a reasonable user-facing error instead of raw error lines; confirm the supported-site path still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.