Class TaskStatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
io.vanslog.spring.data.meilisearch.TaskStatusException
- All Implemented Interfaces:
Serializable
Exception indicating that a completed Meilisearch task did not succeed.
- Author:
- Junghoon Ban
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTaskStatusException(int taskUid, String status, String errorCode, String msg) Constructor for TaskStatusException.TaskStatusException(int taskUid, String status, String errorCode, String msg, Throwable cause) Constructor for TaskStatusException. -
Method Summary
Modifier and TypeMethodDescriptionReturn the server error code when available.Return the status reported for the completed task.intReturn the task UID.toString()Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCauseMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
TaskStatusException
Constructor for TaskStatusException.- Parameters:
taskUid- the task UIDstatus- the server-reported task statuserrorCode- the server error code, or null if unavailablemsg- the detail message
-
TaskStatusException
public TaskStatusException(int taskUid, String status, @Nullable String errorCode, String msg, @Nullable Throwable cause) Constructor for TaskStatusException.- Parameters:
taskUid- the task UIDstatus- the server-reported task statuserrorCode- the server error code, or null if unavailablemsg- the detail messagecause- the root cause from the data access API in use
-
-
Method Details
-
getTaskUid
public int getTaskUid()Return the task UID.- Returns:
- the task UID
-
getStatus
Return the status reported for the completed task.- Returns:
- the server-reported task status
-
getErrorCode
Return the server error code when available.- Returns:
- the server error code, or null if the task has no error details
-
toString
-