Class CosmosAccessException

  • All Implemented Interfaces:
    Serializable

    public class CosmosAccessException
    extends org.springframework.dao.DataAccessException
    Public class extending DataAccessException, exposes innerException. Every API in CosmosRepository and ReactiveCosmosRepository should throw CosmosAccessException. innerException refers to the exception thrown by CosmosDB SDK. Callers of repository APIs can rely on innerException for any retriable logic, or for more details on the failure of the operation.
    See Also:
    Serialized Form
    • Field Detail

      • cosmosException

        protected final CosmosException cosmosException
        Cosmos exception.
    • Constructor Detail

      • CosmosAccessException

        public CosmosAccessException​(String msg)
        Construct a CosmosDBAccessException with the specified detail message.
        Parameters:
        msg - the detail message
      • CosmosAccessException

        public CosmosAccessException​(@Nullable
                                     String msg,
                                     @Nullable
                                     Throwable cause)
        Construct a CosmosDBAccessException with the specified detail message. and nested exception.
        Parameters:
        msg - the detail message
        cause - the nested Throwable
      • CosmosAccessException

        public CosmosAccessException​(@Nullable
                                     String msg,
                                     @Nullable
                                     Exception cause)
        Construct a CosmosDBAccessException with the specified detail message and nested exception.
        Parameters:
        msg - the detail message
        cause - the nested exception
    • Method Detail

      • getCosmosException

        public CosmosException getCosmosException()
        To get exception object for cosmos client
        Returns:
        CosmosException