UTIL_HttpClient.FailureAction
Class · Group: Web Services
Learn it: Fast Start - Outbound APIs and Web Services guide
global enum UTIL_HttpClient.FailureActionDefines the action to take when an HTTP call fails.
Example
UTIL_HttpClient.post('MyService', '/send')
.onFailure(UTIL_HttpClient.FailureAction.LOG_FAILURE)
.send();Inner Classes
| Class | Description |
|---|---|
| LOG_FAILURE | Log an ApiIssue__c record without retrying. |
| RETRY_THEN_LOG | Retry the request, then log a failure record if all retries are exhausted. |
Value Details
LOG_FAILURE
global LOG_FAILURELog 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
global RETRY_THEN_LOGRetry 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.