aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/ruby/errors_and_cancellation/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ruby/errors_and_cancellation/README.md')
-rw-r--r--examples/ruby/errors_and_cancellation/README.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/ruby/errors_and_cancellation/README.md b/examples/ruby/errors_and_cancellation/README.md
new file mode 100644
index 0000000000..126518c4aa
--- /dev/null
+++ b/examples/ruby/errors_and_cancellation/README.md
@@ -0,0 +1,25 @@
+#Errors and Cancelletion code samples for grpc-ruby
+
+The examples in this directory show use of grpc errors.
+
+On the server side, errors are returned from service
+implementations by raising a certain `GRPC::BadStatus` exception.
+
+On the client side, GRPC errors get raised when either:
+ * the call completes (unary and client-streaming call types)
+ * the response `Enumerable` is iterated through (server-streaming and
+ bidi call types).
+
+## To run the examples here:
+
+Start the server:
+
+```
+> ruby error_examples_server.rb
+```
+
+Then run the client:
+
+```
+> ruby error_examples_client.rb
+```