lib/you_track/client/models/users.rb in you_track-0.4.7 vs lib/you_track/client/models/users.rb in you_track-0.4.8
- old
+ new
@@ -5,9 +5,11 @@
service.users.new(service.get_current_user.body)
end
def get(username)
service.users.new(service.get_user(username).body)
- rescue Faraday::ResourceNotFound
+ rescue Faraday::ClientError => e
+ # yes 403 if you have valid creds BUT the user isn't there
+ raise unless [403, 404].include?(e.response[:status])
nil
end
end