You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an operation validator is defined for a full-stack signal, no matter what the rejection error is, on the client side, the reason is: "server rejected the operation".
Expected-behavior
To be able to show a the validation error message that is defined for the server-side Signal instance's validator.
Reproduction
Define an operation validator for signal instance that is returned to the client:
privatefinalListSignal<Message> chatSignal = newListSignal<>(Message.class).withOperationValidator(
operation -> {
if (operationinstanceofValueOperation<Message> valueOp) {
if (valueOp.value().text().toLowerCase().contains("bad")) {
returnValidationResult.reject("Bad words are not allowed");
}
}
returnValidationResult.allow();
});
When user tries to insert a message to any of the above signals instances, and the operation validation gets rejected, the only available reason for in the onrejected callback is always: "server rejected the operation":
Describe the bug
When an operation validator is defined for a full-stack signal, no matter what the rejection error is, on the client side, the reason is: "server rejected the operation".
Expected-behavior
To be able to show a the validation error message that is defined for the server-side Signal instance's validator.
Reproduction
Define an operation validator for signal instance that is returned to the client:
or even with a readonly signal:
When user tries to insert a message to any of the above signals instances, and the operation validation gets rejected, the only available reason for in the
onrejected
callback is always: "server rejected the operation":System Info
Vaadin: 24.6.0.alpha4
Hilla: 24.6.0.alpha5
The text was updated successfully, but these errors were encountered: