Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update random_word.py #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions random_word/random_word.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_random_word(self, **kwargs):
return result['word']
else:
raise Exception(
"Error occured, No result found. If you think this was a mistake than raise issue at {}".format(self.issue_url))
"Error occured. REASON: Expected 200, got " + str(response.status_code) + ".\nIf you think this was a mistake than raise issue at {}".format(self.issue_url))

def get_random_words(self, **kwargs):
"""Returns a list of random words
Expand Down Expand Up @@ -109,7 +109,7 @@ def get_random_words(self, **kwargs):
return word_list
else:
raise Exception(
"Error occured, No result found. If you think this was a mistake than raise issue at {}".format(self.issue_url))
"Error occured. REASON: Expected 200, got " + str(response.status_code) + ".\nIf you think this was a mistake than raise issue at {}".format(self.issue_url))

def word_of_the_day(self, **kwargs):
"""Returns a specific WordOfTheDay
Expand Down Expand Up @@ -146,4 +146,4 @@ def word_of_the_day(self, **kwargs):
})
else:
raise Exception(
"Error occured, No result found. If you think this was a mistake than raise issue at {}".format(self.issue_url))
"Error occured. REASON: Expected 200, got " + str(response.status_code) + ".\nIf you think this was a mistake than raise issue at {}".format(self.issue_url))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.