result.isFailure -> result.code.isFailure