> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# setExecutionResultErrorWithResult()

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: function
- Stability: beta
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/model/commands/executionResults.ts

> **Beta API.** Mostly stable, but details may change in a minor release, outside SemVer. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Creates an [IUpsertExecutionResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iupsertexecutionresult/index.md) command for an execution that finished with an error but still produced a result.

**Signature:**

```typescript
export declare function setExecutionResultErrorWithResult(options: {
    id: ObjRef | string;
    error: GoodDataSdkError;
    executionResult: IExecutionResult;
    correlationId?: string;
}): IUpsertExecutionResult;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| options | { id: [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) \| string; error: [GoodDataSdkError](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.gooddatasdkerror/index.md); executionResult: [IExecutionResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iexecutionresult/index.md); correlationId?: string; } |  |

**Returns:**

[IUpsertExecutionResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.iupsertexecutionresult/index.md)

## Remarks

An empty-but-valid execution computes a result (with a resultId) yet surfaces as a no-data error. Recording the result alongside the error lets consumers reference it (e.g. by resultId) while the error keeps the widget in its terminal error state — including the non-exportable gating that the presence of the result alone would otherwise lift.
