public static Error toError(ResultType result) {
        switch (result) {
            case TRANSIENT_ERROR:
                return new Error(ErrorCode.TRANSIENT_ERROR, ResultType.TRANSIENT_ERROR.name());
            case FATAL_ERROR:
                return new Error(ErrorCode.FATAL_ERROR, ResultType.FATAL_ERROR.name());
        }
        return new Error(ErrorCode.NONE, "SUCCESS");
    }
The request failed, and retrying is pointless.
documentapi/src/main/java/com/yahoo/documentapi/Result.java