The Error on Reject feature does not work for roles other than the admin role.
Describe the Bug
First of all, thank you for the "Error on Reject" feature — it's something we've been waiting for a long time.
However, we're experiencing two issues:
- Issue If one flow calls another flow, the "Error on Reject" feature doesn't work, and the system reports the flow as successfully completed.
Example:
Flow A is Webhook / Request URL.
Flow B calls Flow A. Flow A returns a 500 error, but Flow B still shows as successfully completed.
- Issue To work around this limitation, we wrote a custom script in Flow B that checks Flow A’s result and throws an error like throw new Error("Error Message"). While we thought this workaround was effective, we noticed that non-admin users receive a generic error message like "Unexpected Error Occurred", instead of the custom error message.
To Reproduce
🔁 Steps to Reproduce — Issue 1: "Error on Reject" doesn't propagate in nested flows Create Flow A that is triggered via a Webhook / Request URL.
Inside Flow A, intentionally cause an error (e.g., return a 500 status).
Create Flow B that calls Flow A using a "Call Flow" or similar action.
Trigger Flow B.
Observe the result: → Despite Flow A returning an error, Flow B completes successfully without triggering the "Error on Reject" behavior.
🔁 Steps to Reproduce — Issue 2: Custom error message not shown to non-admin users
- Create a Flow
- Add a "Custom Script" operation to the Flow
- In the "Custom Script" operation, write a script that throws an error, for example:
module.exports = async function(data) { throw new Error("This is a custom error message");
}
Observe the result:
→ Instead of showing the custom error message (This is a custom error message), the user sees a generic message such as "Unexpected Error Occurred".
### Directus Version
v11.8.0
### Hosting Strategy
Self-Hosted (Docker Image)
### Database
postgresql 16
No dupes found!
I am unable to reproduce the first reported issue, flow_b correctly returns a failed status when flow_a rejects.
https://github.com/user-attachments/assets/305bf881-c72a-4461-b50f-f69238333d81
The second reported issue is a duplicate of https://github.com/directus/directus/issues/24849. I'll go ahead and close this, happy to continue discussing in this thread and we can reopen if a reproduction for issue 1 is found.