improve error messages

This commit is contained in:
teddit 2021-03-28 16:55:16 +02:00
parent 840a7e28ad
commit af83447951
3 changed files with 6 additions and 2 deletions

View File

@ -13,6 +13,8 @@ html
if http_status_code == "401" || http_status_code == "503"
p This error is probably caused because Reddit itself is down or having server issues.
p Checking <a href="https://www.redditstatus.com">https://www.redditstatus.com</a> might give some information.
if http_status_code == "404"
p The resource you were looking for was not found.
else
- var subreddit = ''
if(user_preferences.subbed_subreddits && Array.isArray(user_preferences.subbed_subreddits))

View File

@ -80,7 +80,8 @@ html
li(class=past === 'all' ? 'active' : '')
a(href="?t=all") all time
if json.links.length === 0
p nothing here
.reddit-error
p This subreddit either doesn't exist, or any posts weren't found.
else
each link in json.links
.link

View File

@ -34,7 +34,8 @@ html
input(type="submit", value="search")
#links.sr.explore
if json.links.length === 0
p nothing here
.reddit-error
p This subreddit either doesn't exist, or any posts weren't found.
else
.infobar.explore
p click the <code>subscribe</code> or unsubscribe buttons to choose which subreddits appear on the home feed.