code: @Override
      public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
          return ErrorMessage.class.isAssignableFrom(type)
                  && mediaType != null && (mediaType.getSubtype().equals("html")
                  || mediaType.getSubtype().equals("xhtml+xml"));
      }
docs: {@inheritDoc}