I have this Method that adds a new customer, So when i put a nickname that already exists an exception is thrown, how can i show the message of the exception in the adding form, iam using primefaces
public String addCustomer() {
webClient
.post()
.uri("/customer/addCustomer")
.bodyValue(customer)
.retrieve()
.onStatus(HttpStatus.BAD_REQUEST::equals,
response -> Mono.error(new NickNameExistException("NickName Exist. Please Try another one.")))
.bodyToMono(Customer.class);