# I need to fail the child workflow if it throw specific error

**URL:** <https://community.temporal.io/t/i-need-to-fail-the-child-workflow-if-it-throw-specific-error/12362>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [June 5, 2024, 8:27pm UTC](https://community.temporal.io/t/i-need-to-fail-the-child-workflow-if-it-throw-specific-error/12362 "2024-06-05T20:27:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arabind\_Behera](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/arabind_behera/32/5433_2.png) [@Arabind\_Behera](https://community.temporal.io/u/Arabind_Behera)\
**Post date:** [June 5, 2024, 8:27pm UTC](https://community.temporal.io/t/i-need-to-fail-the-child-workflow-if-it-throw-specific-error/12362/1 "2024-06-05T20:27:16Z")

</div>

i have a parent workflow and it has multiple child workflows, some time child workflow throw error.  
so it should fail the child workflow without failing parent workflow. other child workflow should execute.

i added this: WorkflowImplementationOptions workflowImplementationOptions =  
WorkflowImplementationOptions.newBuilder()  
.setFailWorkflowExceptionTypes(MMLCommandExecutionException.class)  
.build();  
which is failing both child and parent workflow, due to which other child workflow are terminating.  
is there any solution to this?

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [June 5, 2024, 10:47pm UTC](https://community.temporal.io/t/i-need-to-fail-the-child-workflow-if-it-throw-specific-error/12362/2 "2024-06-05T22:47:55Z")

</div>

Do you catch the ChildWorkfowFailure in the parent workflow code? If it is not handled the parent workflow fails.

---

<div class="post-metadata">

**Author:** ![Arabind\_Behera](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/arabind_behera/32/5433_2.png) [@Arabind\_Behera](https://community.temporal.io/u/Arabind_Behera)\
**Post date:** [June 6, 2024, 8:43am UTC](https://community.temporal.io/t/i-need-to-fail-the-child-workflow-if-it-throw-specific-error/12362/3 "2024-06-06T08:43:49Z")

</div>

thank, its working now.
