Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - Custom error message / success message for actions #435

Closed
nmalzieu opened this issue Sep 26, 2024 · 1 comment
Closed

[FEATURE] - Custom error message / success message for actions #435

nmalzieu opened this issue Sep 26, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@nmalzieu
Copy link

Summary

Right now, successMessage / errorMessage is a string that we setup when we define an action. However there can be multiple reasons why an action fails. It would be great to be able to return a custom success / error message from the action method itself

Basic Example

For instance, trying to call a "sendEmail" method on a non paying user could fail with a message "This user is non paying, can't send email"

Drawbacks

No response

Unresolved questions

No response

@nmalzieu nmalzieu added the enhancement New feature or request label Sep 26, 2024
@cregourd cregourd self-assigned this Sep 26, 2024
@cregourd cregourd mentioned this issue Sep 26, 2024
8 tasks
@cregourd
Copy link
Collaborator

Hi, thanks for your feedback

We've just added these features, you can now use the previous system to display messages, and a new one based on the return (MessageData) of the action function or thrown error during its execution. Dialog actions can now also display a message on their closing by using a MessageData object and passing it to the onClose function in the component.

The new v6.1.0 is available, feel free to give another feedback 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants