class AzureExceptionExtractor {

    public String extractErrorMessage(Throwable t) {
        Throwable rootCause = ExceptionUtils.getRootCause(t);
        return getIfNotNull(rootCause, this::getTransformedErrorMessage);
    }

}