# \#exception

**URL:** https://community.temporal.io/tag/exception/74.md

[Latest](https://community.temporal.io/latest.md) · [Categories](https://community.temporal.io/categories.md) · [Tags](https://community.temporal.io/tags.md)

---

## [Workflow Update Method Failure Proper Response](https://community.temporal.io/t/workflow-update-method-failure-proper-response/11415)

<div class="topic-metadata">

**Author:** [@Bilal\_Fares](https://community.temporal.io/u/Bilal_Fares)\
**Replies:** 6\
**Last updated:** [September 26, 2026, 1:50pm UTC](https://community.temporal.io/t/workflow-update-method-failure-proper-response/11415 "2026-09-26T13:50:22Z")

</div>

Hello, I have a workflow update method that is called as a part of an API execution. I want to ask about the proper way to return an exception to the calling service from the update method. I don’t want to fail the work…

---

## [What is the best practise in terms of handling Workflow failures?](https://community.temporal.io/t/what-is-the-best-practise-in-terms-of-handling-workflow-failures/18249)

<div class="topic-metadata">

**Author:** [@kvs](https://community.temporal.io/u/kvs)\
**Replies:** 0\
**Last updated:** [August 21, 2025, 11:34am UTC](https://community.temporal.io/t/what-is-the-best-practise-in-terms-of-handling-workflow-failures/18249 "2025-08-21T11:34:22Z")

</div>

We have a workflow (with \>1 workflow retries) and workflow publishes a message to a topic on successful completion or failure. Given that we are using workflow retries, ideally we would want to publish an error message …

---

## [Is it possible to specify number of retries based on the exception?](https://community.temporal.io/t/is-it-possible-to-specify-number-of-retries-based-on-the-exception/17591)

<div class="topic-metadata">

**Author:** [@rela589n](https://community.temporal.io/u/rela589n)\
**Replies:** 1\
**Last updated:** [June 2, 2025, 6:34pm UTC](https://community.temporal.io/t/is-it-possible-to-specify-number-of-retries-based-on-the-exception/17591 "2025-06-02T18:34:17Z")

</div>

For example, say we have to ways activity can fail: server error (e.g. 500) api timeout (due to increased load) Consider following scenario: First activity is started (schedule-to-close: 30s) It sends http request, …

---

## [Handling Internal Temporal Exceptions Without Disrupting Workflow Execution](https://community.temporal.io/t/handling-internal-temporal-exceptions-without-disrupting-workflow-execution/16888)

<div class="topic-metadata">

**Author:** [@apocai](https://community.temporal.io/u/apocai)\
**Replies:** 2\
**Last updated:** [April 1, 2025, 1:52pm UTC](https://community.temporal.io/t/handling-internal-temporal-exceptions-without-disrupting-workflow-execution/16888 "2025-04-01T13:52:59Z")

</div>

I’m currently working with Temporal workflows using the Java SDK and Temporal version 1.17.0. I’ve encountered a StatusRuntimeException with the message NOT\_FOUND: Workflow task not found. This exception occurs during th…

---

## [Throwing exception in mocked activity hangs the test](https://community.temporal.io/t/throwing-exception-in-mocked-activity-hangs-the-test/10932)

<div class="topic-metadata">

**Author:** [@yunmanger](https://community.temporal.io/u/yunmanger)\
**Replies:** 7\
**Last updated:** [May 15, 2024, 10:17am UTC](https://community.temporal.io/t/throwing-exception-in-mocked-activity-hangs-the-test/10932 "2024-05-15T10:17:13Z")

</div>

I can’t figure out what I am doing wrong. My tests work fine when mocking happy path, but when throwing an error on a mocked activity the test hangs indefinitely. I tried different combinations of retry configurations, a…

---

## [setFailWorkflowExceptionTypes do not work to DynamicWorkflow](https://community.temporal.io/t/setfailworkflowexceptiontypes-do-not-work-to-dynamicworkflow/11422)

<div class="topic-metadata">

**Author:** [@zuodimiaoyun](https://community.temporal.io/u/zuodimiaoyun)\
**Replies:** 1\
**Last updated:** [March 20, 2024, 12:06pm UTC](https://community.temporal.io/t/setfailworkflowexceptiontypes-do-not-work-to-dynamicworkflow/11422 "2024-03-20T12:06:35Z")

</div>

I register my dynamic workflow with WorkflowImplementationOptions.failWorkflowExceptionTypes. But the workflow did not fail when the exception type occurs. The code to reproduce this problem are as follows: package co…

---

## [Global exception handler for all workflows (or activities) exceptions](https://community.temporal.io/t/global-exception-handler-for-all-workflows-or-activities-exceptions/10315)

<div class="topic-metadata">

**Author:** [@n00st](https://community.temporal.io/u/n00st)\
**Replies:** 7\
**Last updated:** [December 10, 2023, 7:03pm UTC](https://community.temporal.io/t/global-exception-handler-for-all-workflows-or-activities-exceptions/10315 "2023-12-10T19:03:24Z")

</div>

Hi. I need to catch all workflow exceptions and convert them to real exception based by ‘type’ field, but I don’t want to write try-catch blocks ewerywhere. Is there a way to create a global exception handler in temporal…

---

## [Execute activity from interceptor fails - \[Called from non workflow or workflow callback thread\]](https://community.temporal.io/t/execute-activity-from-interceptor-fails-called-from-non-workflow-or-workflow-callback-thread/10191)

<div class="topic-metadata">

**Author:** [@Julian\_Ocampo](https://community.temporal.io/u/Julian_Ocampo)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 10:24pm UTC](https://community.temporal.io/t/execute-activity-from-interceptor-fails-called-from-non-workflow-or-workflow-callback-thread/10191 "2023-11-24T22:24:18Z")

</div>

Hi Temporal Team, When I try to run an activity to notify a block of an activity within a workflow, I receive the following exception: “Called from non workflow or workflow callback thread” What should be the correct …

---

## [Handle activity failure exceptions in workflows](https://community.temporal.io/t/handle-activity-failure-exceptions-in-workflows/391)

<div class="topic-metadata">

**Author:** [@saket\_kothari](https://community.temporal.io/u/saket_kothari)\
**Replies:** 6\
**Last updated:** [November 8, 2022, 5:16pm UTC](https://community.temporal.io/t/handle-activity-failure-exceptions-in-workflows/391 "2022-11-08T17:16:39Z")

</div>

Hi Team, I have a workflow with 100s of activities,some sequential and some parallel. How to I catch exception in such a scenario? Do I need to put try/catch in each sequential activity? can you please tell me if the…

---

## [Getting java.lang.reflect.InaccessibleObjectException when migrated to Java 17](https://community.temporal.io/t/getting-java-lang-reflect-inaccessibleobjectexception-when-migrated-to-java-17/6168)

<div class="topic-metadata">

**Author:** [@Tymofii\_Voitenko](https://community.temporal.io/u/Tymofii_Voitenko)\
**Replies:** 4\
**Last updated:** [October 11, 2022, 4:10pm UTC](https://community.temporal.io/t/getting-java-lang-reflect-inaccessibleobjectexception-when-migrated-to-java-17/6168 "2022-10-11T16:10:32Z")

</div>

I’m using temporal SDK version 1.16.0. Once I had updated my project from java 8 to java 17, I started getting java.lang.reflect.InaccessibleObjectExceptions, when running workflows: io.temporal.internal.statemachines.…

---

## [Throwing Exception vs Failure in workflow](https://community.temporal.io/t/throwing-exception-vs-failure-in-workflow/1059)

<div class="topic-metadata">

**Author:** [@sdwr98](https://community.temporal.io/u/sdwr98)\
**Replies:** 8\
**Last updated:** [September 28, 2022, 6:50pm UTC](https://community.temporal.io/t/throwing-exception-vs-failure-in-workflow/1059 "2022-09-28T18:50:08Z")

</div>

Hi all, I have a question about the Failure hierarchy and what the best practice is for handling workflow errors. Are workflows supposed to throw only Failures, or is it acceptable to throw an exception (e.g. IllegalAr…

---

## [Running into an issue when creating namespace programmatically](https://community.temporal.io/t/running-into-an-issue-when-creating-namespace-programmatically/2783)

<div class="topic-metadata">

**Author:** [@nkatre](https://community.temporal.io/u/nkatre)\
**Replies:** 7\
**Last updated:** [August 26, 2022, 11:22pm UTC](https://community.temporal.io/t/running-into-an-issue-when-creating-namespace-programmatically/2783 "2022-08-26T23:22:55Z")

</div>

I am creating namespace programmatically Worker workflowWorker = workerFactory.newWorker(WORKFLOW\_TASK\_QUEUE); workflowWorker.registerWorkflowImplementationTypes(WorkflowImpl.class); workflowWorke…

---

## [What are the different ways Temporal handles exceptions thrown in Workflows?](https://community.temporal.io/t/what-are-the-different-ways-temporal-handles-exceptions-thrown-in-workflows/2789)

<div class="topic-metadata">

**Author:** [@nathan\_shields](https://community.temporal.io/u/nathan_shields)\
**Replies:** 5\
**Last updated:** [July 14, 2022, 1:26pm UTC](https://community.temporal.io/t/what-are-the-different-ways-temporal-handles-exceptions-thrown-in-workflows/2789 "2022-07-14T13:26:41Z")

</div>

I’d like to confirm my understand of how Temporal handles uncaught Exceptions thrown outside of Activities. I have written my current understanding below, and I have a few specific questions about it. Are these cases a…

---

## [Exceptions in Client Poller](https://community.temporal.io/t/exceptions-in-client-poller/1025)

<div class="topic-metadata">

**Author:** [@nithin](https://community.temporal.io/u/nithin)\
**Replies:** 2\
**Last updated:** [August 13, 2021, 9:21am UTC](https://community.temporal.io/t/exceptions-in-client-poller/1025 "2021-08-13T09:21:41Z")

</div>

I am noticing couple of transient exceptions for (NOT\_FOUND and INVALID\_ARGUMENT) in my java-sdk poller on my client. My client is running on temporal-sdk:1.0.3 Pasting the stack trace for both io.temporal.internal.wor…
