Displaying custom errors in the modal window when using flows #18634
Replies: 9 comments 8 replies
-
I can't get a modal to appear, even for admins. I really want to throw "something" at the user to let them know the flow failed. |
Beta Was this translation helpful? Give feedback.
-
First, I need to say that this feature is super important for better control of flows, and mainly to improve the user experience in the app. Second, performing tests (as ADMIN), I was able to print the modal by removing the extension parameters from throw (example below). But unfortunately, I can't edit sensitive modal issues like Title, Message Color and Button Text.
Unfortunately too, the Directus documentation also doesn't talk about using throw and its parameters. It would be a great start to improve the documentation. It's here the CODES list from source:
Looking at the source code, I believe it would not be difficult to implement a palliative solution by creating a generic model to address dialog desires from the flow. |
Beta Was this translation helpful? Give feedback.
-
Heya! Thanks for opening this feature request! This feature request has received over 15 votes from the community. This means we'll move this feature request to the Under Review state! The Core team will schedule a meeting to review this request as soon as possible. The discussion will then be approved or denied. You may or may not be invited to join this meeting with the core team. For more information, see our Feature Request Process. |
Beta Was this translation helpful? Give feedback.
-
Cool! Given the relevance of the user experience and the complexity that flows can adopt, it would be of great value to offer not only the possibility of displaying the modal, but also offering customized actions for it, which does not seem complex to me given the architecture of the flow itself. Because the modal could be a block and its response (initially with two buttons) could route to the next block. This can be very important because some actions in the flow can be destructive or impact other data, such as statuses or values in other collections. In this case, it should also be possible to edit the button names. Their display could continue as the default, a secondary (cancellation/refusal) and a primary (success/confirmation). |
Beta Was this translation helpful? Give feedback.
-
Related feature request that touches on the implementation for the underlying error message: #19178 |
Beta Was this translation helpful? Give feedback.
-
I'm really looking forward to this feature! As we are currently unable to provide feedback to App users (not admins), and this has generated some frustration. As already said above, providing continuous feedback to the user is a UX practice. |
Beta Was this translation helpful? Give feedback.
-
OMG! Any news about this? We really need this! In addition, I would love to see what @jeffsmonteiro commented on. Adding these modals to flows would be amazing and very practical! |
Beta Was this translation helpful? Give feedback.
-
Also would love an update on this. It would be amazing to be able to trigger a modal from a flow. |
Beta Was this translation helpful? Give feedback.
-
Another vote for the ability to display a modal/custom error message from a flow! |
Beta Was this translation helpful? Give feedback.
-
Summary
Now when using "Run script" in threads, if you want to inform users about an error and terminate the process (filter) throw new Error() is used
But error prints only for administrator.
I propose to add an error return method from the code, so you can set your own header, text, and error code. Right now an unexpected error is displayed.
You can also add a basic "inform user" operation
Basic Example
No response
Motivation
Often there are additional checks in the threads and there is no way to report that his request has ended for such and such reason.
Detailed Design
There is already a mechanism to display a modal window on error, you need to give the possibility to display it from the flows
Requirements List
Must Have:
Should Have:
Could Have:
Won't Have:
Drawbacks
I don't think so, because the function is really useful for custom solutions
Alternatives
Manually change node_module every update or hope that users learn psychic skills
Adoption Strategy
I think that developers who actively use streams will appreciate this update. The standard error output and its masking for non-administrators will remain, so it doesn't break anything
Unresolved Questions
No response
Beta Was this translation helpful? Give feedback.
All reactions