# Missing information in objected returned from Workflow when Activity failes

**URL:** <https://community.temporal.io/t/missing-information-in-objected-returned-from-workflow-when-activity-failes/13309>\
**Category:** Community Support\
**Tags:** dotnet-sdk\
**Created:** [August 27, 2024, 1:58pm UTC](https://community.temporal.io/t/missing-information-in-objected-returned-from-workflow-when-activity-failes/13309 "2024-08-27T13:58:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcevalhos](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@gcevalhos](https://community.temporal.io/u/gcevalhos)\
**Post date:** [August 27, 2024, 1:58pm UTC](https://community.temporal.io/t/missing-information-in-objected-returned-from-workflow-when-activity-failes/13309/1 "2024-08-27T13:58:04Z")

</div>

Hello all, I’m working on a PoC for using Temporal .NET SDK (version 1.2.0) in one of our flows and I started implementing some tests for it.

While working on the tests for scenarios where Activities fail, I noticed the returned results from the Workflow don’t contain the expected information added during the Workflow execution (i.e. error message). I have the impression a new instance of my result class is created and the info added during workflow execution is lost.

When the Activies work as expected (represented as `Happy path` in the example I provided), I have no issues and all expected data is present.

I created an environment to share the results I’m seeing at [GitHub - guhcevalhos/temporal: Reproduce issue with Temporal](https://github.com/guhcevalhos/temporal).

Please let me know what other information I can provide to help look into this issue.

Thanks,  
Gustavo

---

<div class="post-metadata">

**Author:** ![Chad\_Retz](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/chad_retz/32/1396_2.png) [@Chad\_Retz](https://community.temporal.io/u/Chad_Retz)\
**Post date:** [August 27, 2024, 2:43pm UTC](https://community.temporal.io/t/missing-information-in-objected-returned-from-workflow-when-activity-failes/13309/2 "2024-08-27T14:43:12Z")

</div>

Before we debug your code, can you clarify the issue a bit? You are trapping the exception inside the workflow and returning. Are you saying that is not returning the value you are having it return? Can you show the exact stack trace from your test that fails in your GitHub repo? Are you expecting `Data` to not be `null` even though it is never set? Also, take a look at the history in the UI and see what the workflow result shows. Do your models properly work with `System.Text.Json`?

---

<div class="post-metadata">

**Author:** ![gcevalhos](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@gcevalhos](https://community.temporal.io/u/gcevalhos)\
**Post date:** [August 28, 2024, 7:24am UTC](https://community.temporal.io/t/missing-information-in-objected-returned-from-workflow-when-activity-failes/13309/3 "2024-08-28T07:24:24Z")

</div>

> Do your models properly work with `System.Text.Json` ?

This was the problem. By default `System.Text.Json` requires a public setter. [Use immutable types and properties - .NET | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/immutability)

Thank you for your help!
