Skip to content

Commit

Permalink
[rackspace|identity] Handle NotAuthorized respones from the identity …
Browse files Browse the repository at this point in the history
…API in the user model
  • Loading branch information
brianhartsock committed Jun 26, 2012
1 parent 788d452 commit bae7e50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/fog/rackspace/models/identity/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ def get(user_id)
new(data)
rescue Excon::Errors::NotFound
nil
rescue Excon::Errors::NotAuthorized
nil
end

def get_by_name(user_name)
data = connection.get_user_by_name(user_name).body['user']
new(data)
rescue Excon::Errors::NotFound
nil
rescue Excon::Errors::NotAuthorized
nil
end
end
end
Expand Down

0 comments on commit bae7e50

Please sign in to comment.