CosmosExceptionUtils Class
- java.
lang. Object - com.
azure. spring. data. cosmos. exception. CosmosExceptionUtils
- com.
public class CosmosExceptionUtils
To handle and throw a cosmos db exception when access the database
Constructor Summary
| Constructor | Description |
|---|---|
| CosmosExceptionUtils() |
Creates an instance of CosmosExceptionUtils |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static Mono<T> |
exceptionHandler(String message, Throwable throwable, ResponseDiagnosticsProcessor responseDiagnosticsProcessor)
To throw a Cosmos |
| static Mono<T> |
findAPIExceptionHandler(String message, Throwable throwable, ResponseDiagnosticsProcessor responseDiagnosticsProcessor)
To find an exception |
Methods inherited from java.lang.Object
Constructor Details
CosmosExceptionUtils
public CosmosExceptionUtils()
Creates an instance of CosmosExceptionUtils
Method Details
exceptionHandler
public static Mono<T> <T>exceptionHandler(String message, Throwable throwable, ResponseDiagnosticsProcessor responseDiagnosticsProcessor)
To throw a CosmosDBAccessException
Parameters:
Returns:
findAPIExceptionHandler
public static Mono<T> <T>findAPIExceptionHandler(String message, Throwable throwable, ResponseDiagnosticsProcessor responseDiagnosticsProcessor)
To find an exceptionHandler for a exception and return empty Mono if the exception status code is not found
Parameters:
Returns: