Skip to content

Commit

Permalink
Better handling of API errors from get_page_content
Browse files Browse the repository at this point in the history
  • Loading branch information
ragesoss committed Oct 11, 2017
1 parent 78fc974 commit a791349
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/student_greeting_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def update_greeting_status
private

def talk_page_blank?
WikiApi.new(@wiki).get_page_content(@student.talk_page).blank?
# Non-existent pages will return '', but API errors will return nil
WikiApi.new(@wiki).get_page_content(@student.talk_page) == ''
end

def contributors_to_page(page_title)
Expand Down

0 comments on commit a791349

Please sign in to comment.