Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Merge 79f8e23 into 2d92a6b
Browse files Browse the repository at this point in the history
  • Loading branch information
matsimitsu committed Aug 26, 2014
2 parents 2d92a6b + 79f8e23 commit 7dc7a61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/moped/operation/read.rb
Expand Up @@ -46,7 +46,9 @@ def initialize(operation)
# @since 2.0.0
def execute(node)
node.process(operation) do |reply|
if operation.failure?(reply)
if reply.unauthorized?
raise Errors::AuthenticationFailure.new(operation, reply.documents.first)
elsif operation.failure?(reply)
raise operation.failure_exception(reply)
end
operation.results(reply)
Expand Down

0 comments on commit 7dc7a61

Please sign in to comment.