aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/pb/grpc/health/checker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'src/ruby/pb/grpc/health/checker.rb')
-rw-r--r--src/ruby/pb/grpc/health/checker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ruby/pb/grpc/health/checker.rb b/src/ruby/pb/grpc/health/checker.rb
index 4bce1744c4..6b2d852ebf 100644
--- a/src/ruby/pb/grpc/health/checker.rb
+++ b/src/ruby/pb/grpc/health/checker.rb
@@ -52,7 +52,9 @@ module Grpc
@status_mutex.synchronize do
status = @statuses["#{req.service}"]
end
- fail GRPC::BadStatus, StatusCodes::NOT_FOUND if status.nil?
+ if status.nil?
+ fail GRPC::BadStatus.new_status_exception(StatusCodes::NOT_FOUND)
+ end
HealthCheckResponse.new(status: status)
end