@Test public void shouldConvertDeadlineExceededStatusExceptionWithDescription() { StatusException exception = Status.DEADLINE_EXCEEDED.withDescription("Oops!").asException(); Http.ResponseStatus status = GrpcHelper.toHttpResponseStatus(exception); assertThat(status.code(), is(408)); assertThat(status.reasonPhrase(), is("Oops!")); }
public static Http.ResponseStatus toHttpResponseStatus(StatusException ex) { return toHttpResponseStatus(ex.getStatus()); }
GrpcHelper { public static Http.ResponseStatus toHttpResponseStatus(StatusException ex) { return toHttpResponseStatus(ex.getStatus()); } }
GrpcHelper { public static Http.ResponseStatus toHttpResponseStatus(StatusException ex) { return toHttpResponseStatus(ex.getStatus()); } private  GrpcHelper(); }
GrpcHelper { public static Http.ResponseStatus toHttpResponseStatus(StatusException ex) { return toHttpResponseStatus(ex.getStatus()); } private  GrpcHelper(); static String extractServiceName(String fullMethodName); static String extractNamePrefix(String fullMethodName); static String extractMethodName(String fullMethodName); static Http.ResponseStatus toHttpResponseStatus(StatusException ex); static Http.ResponseStatus toHttpResponseStatus(StatusRuntimeException ex); static Http.ResponseStatus toHttpResponseStatus(Status status); static Throwable ensureStatusException(Throwable thrown, Status status); static StatusRuntimeException ensureStatusRuntimeException(Throwable thrown, Status status); }
GrpcHelper { public static Http.ResponseStatus toHttpResponseStatus(StatusException ex) { return toHttpResponseStatus(ex.getStatus()); } private  GrpcHelper(); static String extractServiceName(String fullMethodName); static String extractNamePrefix(String fullMethodName); static String extractMethodName(String fullMethodName); static Http.ResponseStatus toHttpResponseStatus(StatusException ex); static Http.ResponseStatus toHttpResponseStatus(StatusRuntimeException ex); static Http.ResponseStatus toHttpResponseStatus(Status status); static Throwable ensureStatusException(Throwable thrown, Status status); static StatusRuntimeException ensureStatusRuntimeException(Throwable thrown, Status status);  }