Package org.a2aproject.sdk.server.tasks
Class TaskStoreException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.a2aproject.sdk.spec.A2AException
org.a2aproject.sdk.spec.A2AServerException
org.a2aproject.sdk.server.tasks.TaskStoreException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TaskPersistenceException,TaskSerializationException
Base exception for TaskStore persistence layer failures.
Root exception for all task storage and retrieval errors. Specialized subclasses provide specific failure contexts:
TaskSerializationException- JSON/data format errorsTaskPersistenceException- Database/storage system failures
Usage Context
Thrown byTaskStore implementations during:
save(Task, boolean)- Task persistence failuresget(String)- Task retrieval failuresdelete(String)- Task deletion failureslist(ListTasksParams, ServerCallContext)- Task listing failures
Error Handling Pattern
Caught byMainEventBusProcessor which:
- Logs the failure with full context (taskId, operation)
- Distributes
InternalErrorevent to clients - Preserves exception cause chain for diagnostics
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TaskStoreException with no message or cause.TaskStoreException(@Nullable String taskId, String msg) Creates a new TaskStoreException with the specified task ID and message.TaskStoreException(@Nullable String taskId, String msg, Throwable cause) Creates a new TaskStoreException with the specified task ID, message, and cause.TaskStoreException(String msg) Creates a new TaskStoreException with the specified message.TaskStoreException(String msg, Throwable cause) Creates a new TaskStoreException with the specified message and cause.TaskStoreException(Throwable cause) Creates a new TaskStoreException with the specified cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TaskStoreException
public TaskStoreException()Creates a new TaskStoreException with no message or cause. -
TaskStoreException
Creates a new TaskStoreException with the specified message.- Parameters:
msg- the exception message
-
TaskStoreException
Creates a new TaskStoreException with the specified cause.- Parameters:
cause- the underlying cause
-
TaskStoreException
Creates a new TaskStoreException with the specified message and cause.- Parameters:
msg- the exception messagecause- the underlying cause
-
TaskStoreException
Creates a new TaskStoreException with the specified task ID and message.- Parameters:
taskId- the task identifier (may be null for operations not tied to a specific task)msg- the exception message
-
TaskStoreException
Creates a new TaskStoreException with the specified task ID, message, and cause.- Parameters:
taskId- the task identifier (may be null for operations not tied to a specific task)msg- the exception messagecause- the underlying cause
-
-
Method Details
-
getTaskId
Returns the task ID associated with this exception.- Returns:
- the task ID, or null if not associated with a specific task
-