code: @Override
      public void filter(ContainerRequestContext requestContext,
                         ContainerResponseContext responseContext) throws IOException {
          if (!responseContext.hasEntity()
                  && !((ContainerResponse) responseContext).isMappedFromException()
                  && responseContext.getStatus() >= 400
                  && responseContext.getStatus() < 600) {
              throw new WebApplicationException(responseContext.getStatus());
          }
  
          List<MediaType> types = null;
          // 找不到 writer/reader, 提供系统有的 writer/reader 输出错误
          if (responseContext.getStatus() == 406) {
              types = workersProvider.get()
                      .getMessageBodyWriterMediaTypes(
                              responseContext.getEntityClass(),
                              responseContext.getEntityType(),
                              responseContext.getEntityAnnotations());
          } else if (responseContext.getStatus() == 415) {
              types = workersProvider.get()
                      .getMessageBodyReaderMediaTypes(
                              responseContext.getEntityClass(),
                              responseContext.getEntityType(),
                              responseContext.getEntityAnnotations());
          }
          if (types != null) {
              ((ContainerResponse) responseContext).setMediaType(parseMediaType(types));
          }
      }
docs: {@inheritDoc}