directus
directus copied to clipboard
Flows with manual triggers show a success message even when they failed
Describe the Bug
When I manually trigger a flow. And then that flow fails. Directus will show a "Flow {flow_name} ran succesfully" message.
To Reproduce
- Create a flow with manual trigger
- add a condition that always fails e.g.
{
"$trigger": {
"method": {
"_eq": "NOT_A_HTTP_METHOD"
}
}
}
- Run the flow via the ui
Hosting Strategy
Self-Hosted (Docker Image)
Currently the flows only return information that was part of the flow and no meta information if it succeeded. So this would be an enhancement to flows and the text is meant that it ran at all.
Thank you yes that makes sense. So it is not technically a bug, but for a user triggering a flow I think this is missleading. In the context of a flow it ran, but for the user let's say this is a flow named "Publish" what I care about is that the publication was succesfull.
So as an enhancement, maybe it is possible to add a way to dispay a message to the user? (Maybe this is already possible? And I don't know how…)
Throwing an emoji on this one. I have a few flows that throw errors in specific circumstances (i.e. trying to update status without publish date set, etc).
At the moment, besides sending an email, I don't think there is a way to help the user understand why the flow failed.
Suggestion:
- A 'flow failed' notification can be show to user instead of the default "flow ran successfully" notification
- Notification has different colour and either does not auto close, or has much longer lifespan
- If error message is throw by the flow, message is shown in notification
- User can click a 'details' link to view error log
@d3v1an7 I think ideally there's a "format error" operation that'll return an error in the shape the Directus app expects, which it can then in turn render in a proper dialog 🤔
@rijkvanzanten Ah yep, that is even better!! That way there is no change to existing/default behaviour, and given it is an operation, the user can choose when it should be sent. Love it.
Semi-related discussion threads that seem to support the need here, although I can see this one has already made it to the backlog :)
- https://github.com/directus/directus/discussions/16342
- https://github.com/directus/directus/discussions/18634
https://github.com/directus/directus/issues/19612 is related, which I considered a bug but I think it's just not supported yet.
Being able to customize the title, message, icon, and color of the toast would be great for user experience.