code: public GenericResponseBuilder<T> errorEntity(Object errorEntity, Annotation[] annotations) {
      if (body != null) {
        throw new IllegalStateException(
            "entity already set. Only one of entity and errorEntity may be set");
      }
      rawBuilder.entity(errorEntity, annotations);
      hasErrorEntity = true;
      return this;
    }
docs: Sets the response error entity body on the builder.
  
  <p>A specific media type can be set using the {@code type(...)} methods.
  
  @param errorEntity the response error entity body
  @param annotations annotations, in addition to the annotations on the resource method returning
  the response, to be passed to the {@link MessageBodyWriter}
  @return this builder
  @see #type(MediaType)
  @see #type(String)