title: How can I transfer a detail exception message within gRPC's responseObserver.onError()
body: <p>I'm trying to transfer a detail message that describe the exception with gRPC. I've learned that I should use responseObserver.onError to transfer it, and gRPC offer Metadata to do it, but I still don't know where to put it because i can't create a Metadata, all the constructor of Metadata is not public.</p>
  
  <pre><code>static class GrpcTestService extends GrpcTestGrpc.GrpcTestImplBase {
  
          @Override
          public void sayHello(HelloRequest req, StreamObserver&lt;HelloResponse&gt; responseObserver) {
              try {
                  HelloResponse reply = HelloResponse.newBuilder().setMessage("got it ! " + req.getName()).build();
                  throw new RuntimeException("I'm an exception!!!");
  //                responseObserver.onNext(reply);
  //                responseObserver.onCompleted();
              } catch (Exception e) {
                  responseObserver.onError(new StatusRuntimeException(Status.ABORTED, new Metadata("metadata exception".getBytes())));
              }
          }
      }
  </code></pre>
  
  <p>As above, I can't create an Metadata by 'new Metadata("xxxx")', so how can I wrap my special message within responseObserver.onError?</p>