# UTIL_HttpClient.FailureAction

**Class** · Group: `Web Services`

Learn it: [Fast Start - Outbound APIs](/fast-start-outbound-apis) and [Web Services guide](/web-services-guide)

<div class="apex-member apex-class">

```apex
global enum UTIL_HttpClient.FailureAction
```

Defines the action to take when an HTTP call fails.

**Example**

```apex
UTIL_HttpClient.post('MyService', '/send')
   .onFailure(UTIL_HttpClient.FailureAction.LOG_FAILURE)
   .send();
```

</div>

---

## Inner Classes

| Class | Description |
|-------|-------------|
| [LOG_FAILURE](#log-failure) | Log an ApiIssue__c record without retrying. |
| [RETRY_THEN_LOG](#retry-then-log) | Retry the request, then log a failure record if all retries are exhausted. |

---

## Value Details

### LOG_FAILURE

```apex
global LOG_FAILURE
```

Log an ApiIssue__c record without retrying.

Caveat — delegation mode: the underlying KEY_SKIP_RETRY flag that distinguishes
LOG_FAILURE from RETRY_THEN_LOG is consumed only by DefaultOutboundHandler.sendRequest's
synchronous retry loop. When the request is delegated to your own handler
via useHandler(HandlerClass.class), your handler decides its own retry
behaviour and the LOG_FAILURE / RETRY_THEN_LOG distinction is observationally
identical from the framework's side. If you write your own handlers, they should
read the KEY_SKIP_RETRY parameter from the inbound DTO_NameValues if they want to
honour the caller's "don't retry" intent.

### RETRY_THEN_LOG

```apex
global RETRY_THEN_LOG
```

Retry the request, then log a failure record if all retries are exhausted.

In delegation mode (your own handler via useHandler), retry behaviour is
your handler's responsibility. See LOG_FAILURE for the contract caveat.
