lib/codewars_api/user.rb in codewars_api-0.3.0 vs lib/codewars_api/user.rb in codewars_api-0.4.0

- old
+ new

@@ -3,10 +3,10 @@ include Common def initialize(id_or_username) fail 'Username or id is not set' unless id_or_username @response = RequestHelper.get("#{CodewarsApi::API_URL}/users/#{id_or_username}") - fail @response.message if @response.code == 500 + ResponseChecker.check_errors(@response) end def username @response.to_h['username'] end