Class TaskStatusException

All Implemented Interfaces:
Serializable

public class TaskStatusException extends DataAccessException
Exception indicating that a completed Meilisearch task did not succeed.
Author:
Junghoon Ban
See Also:
  • Constructor Details

    • TaskStatusException

      public TaskStatusException(int taskUid, String status, @Nullable String errorCode, String msg)
      Constructor for TaskStatusException.
      Parameters:
      taskUid - the task UID
      status - the server-reported task status
      errorCode - the server error code, or null if unavailable
      msg - 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 UID
      status - the server-reported task status
      errorCode - the server error code, or null if unavailable
      msg - the detail message
      cause - 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

      public String getStatus()
      Return the status reported for the completed task.
      Returns:
      the server-reported task status
    • getErrorCode

      @Nullable public String getErrorCode()
      Return the server error code when available.
      Returns:
      the server error code, or null if the task has no error details
    • toString

      public String toString()
      Overrides:
      toString in class Throwable