Class AstraDevOpsAPIException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.datastax.astra.client.exceptions.AstraDevOpsAPIException
All Implemented Interfaces:
Serializable

public class AstraDevOpsAPIException extends RuntimeException
Exception thrown when an error occurs during Astra DevOps API operations.

This runtime exception is used to signal failures in interactions with the Astra DevOps API, such as database creation, deletion, or configuration errors. It provides multiple constructors to accommodate different error scenarios, including wrapping underlying exceptions and providing custom error messages.

See Also:
  • Field Details

    • DEFAULT_ERROR_MESSAGE

      public static final String DEFAULT_ERROR_MESSAGE
      Default error message used when no specific message is provided. This message indicates an unexpected error occurred during Astra DevOps API operations.
      See Also:
  • Constructor Details

    • AstraDevOpsAPIException

      public AstraDevOpsAPIException(String message, Throwable parent)
      Constructs a new AstraDevOpsAPIException with the specified detail message and cause.

      This constructor is useful when you want to provide both a descriptive error message and wrap an underlying exception that caused the failure.

      Parameters:
      message - the detail message explaining the reason for the exception
      parent - the underlying cause of this exception (can be null)
    • AstraDevOpsAPIException

      public AstraDevOpsAPIException(String message)
      Constructs a new AstraDevOpsAPIException with the specified detail message.

      Use this constructor when you have a specific error message to communicate but no underlying exception to wrap.

      Parameters:
      message - the detail message explaining the reason for the exception
    • AstraDevOpsAPIException

      public AstraDevOpsAPIException(Throwable throwable)
      Constructs a new AstraDevOpsAPIException wrapping an underlying throwable.

      This constructor is useful when you want to propagate an exception from a lower layer while converting it to an AstraDevOpsAPIException. The message will be derived from the throwable's message.

      Parameters:
      throwable - the underlying cause of this exception