java.lang.Object
org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic ElasticsearchStatusExceptionbadRequestException(String msg, Object... args) static ElasticsearchStatusExceptionbadRequestException(String msg, Throwable cause, Object... args) static ElasticsearchStatusExceptionconflictStatusException(String msg, Object... args) static ElasticsearchStatusExceptionconflictStatusException(String msg, Throwable cause, Object... args) datafeedAlreadyExists(String datafeedId) static ElasticsearchStatusExceptionentityNotFoundException(String msg, Object... args) static ThrowableUnwrap the exception stack and return the most likely cause.jobAlreadyExists(String jobId) static ResourceNotFoundExceptionmissingDatafeedException(String datafeedId) static ResourceNotFoundExceptionstatic ResourceNotFoundExceptionmissingJobException(String jobId) static ResourceNotFoundExceptionmissingModelDeployment(String deploymentId) static ResourceNotFoundExceptionmissingTrainedModel(String modelId) static ResourceNotFoundExceptionmissingTrainedModel(String modelId, Exception cause) static <T> TrequireNonNull(T obj, String paramName) A more REST-friendly Object.requireNonNull()static <T> TrequireNonNull(T obj, org.elasticsearch.xcontent.ParseField paramName) static ElasticsearchExceptionserverError(String msg) static ElasticsearchExceptionserverError(String msg, Object... args) static ElasticsearchExceptionserverError(String msg, Throwable cause) static ElasticsearchExceptionserverError(String msg, Throwable cause, Object... args) static StringshardFailuresToErrorMsg(String jobId, ShardSearchFailure[] shardFailures) Creates an error message that explains there are shard failures, displays info for the first failure (shard/reason) and kindly asks to see more info in the logsstatic ElasticsearchStatusExceptionstatic Throwable
-
Method Details
-
missingJobException
-
jobAlreadyExists
-
missingDatafeedException
-
datafeedAlreadyExists
-
missingDataFrameAnalytics
-
dataFrameAnalyticsAlreadyExists
-
missingModelDeployment
-
missingTrainedModel
-
missingTrainedModel
-
serverError
-
serverError
-
serverError
-
serverError
-
conflictStatusException
public static ElasticsearchStatusException conflictStatusException(String msg, Throwable cause, Object... args) -
conflictStatusException
-
badRequestException
public static ElasticsearchStatusException badRequestException(String msg, Throwable cause, Object... args) -
badRequestException
-
entityNotFoundException
-
taskOperationFailureToStatusException
public static ElasticsearchStatusException taskOperationFailureToStatusException(TaskOperationFailure failure) -
shardFailuresToErrorMsg
Creates an error message that explains there are shard failures, displays info for the first failure (shard/reason) and kindly asks to see more info in the logs -
requireNonNull
A more REST-friendly Object.requireNonNull() -
requireNonNull
public static <T> T requireNonNull(T obj, org.elasticsearch.xcontent.ParseField paramName) -
unwrapCause
- See Also:
-
findSearchExceptionRootCause
Unwrap the exception stack and return the most likely cause. This method has special handling forSearchPhaseExecutionExceptionwhere it returns the cause of the first shard failure.- Parameters:
t- raw Throwable- Returns:
- unwrapped throwable if possible
-