in runtime/src/main/scala/org/apache/pekko/grpc/javadsl/GrpcExceptionHandler.scala [47:64]
override def apply(param: Throwable): Trailers =
param match {
case e: ExecutionException =>
if (e.getCause == null) INTERNAL
else default(system)(e.getCause)
case e: CompletionException =>
if (e.getCause == null) INTERNAL
else default(system)(e.getCause)
case grpcException: GrpcServiceException => Trailers(grpcException.status, grpcException.metadata)
case _: MissingParameterException => INVALID_ARGUMENT
case e: NotImplementedError => Trailers(Status.UNIMPLEMENTED.withDescription(e.getMessage))
case e: UnsupportedOperationException => Trailers(Status.UNIMPLEMENTED.withDescription(e.getMessage))
case e: StatusRuntimeException => Trailers(e.getStatus, new GrpcMetadataImpl(e.getTrailers))
case other =>
val log = Logging(system, "org.apache.pekko.grpc.javadsl.GrpcExceptionHandler")
log.error(other, "Unhandled error: [{}]", other.getMessage)
INTERNAL
}