@Override public Response toResponse(final CannotCreateResourceException e) { debugException(this, e, LOGGER); final Link link = buildConstraintLink(e, context, uriInfo); final String msg = e.getMessage(); return status(BAD_REQUEST).entity(msg).links(link).type(TEXT_PLAIN_WITH_CHARSET).build(); }
throw new CannotCreateResourceException("Invalid interaction model: " + type);