From ca6331b66e90bcd628c23bb091fde4f00511d098 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 8 Sep 2022 22:27:47 -0400 Subject: [PATCH] [Fix] Issue #801: Error during Paging (#802) ## Description Pagination fix for nill pointer ## Type of change - [x] :bug: Bugfix## Issue(s) * closes #801 ## Test Plan - [x] :zap: Unit test --- src/internal/connector/exchange/service_iterators.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/internal/connector/exchange/service_iterators.go b/src/internal/connector/exchange/service_iterators.go index f9baa51f9..68f21b5ab 100644 --- a/src/internal/connector/exchange/service_iterators.go +++ b/src/internal/connector/exchange/service_iterators.go @@ -435,10 +435,12 @@ func iterateFindContainerID( return func(entry any) bool { if isCalendar { entry = CreateCalendarDisplayable(entry) + } - if entry == nil { - return true - } + // True when pagination needs more time to get additional responses or + // when entry is not able to be converted into a displayable + if entry == nil { + return true } folder, ok := entry.(displayable) @@ -451,6 +453,7 @@ func iterateFindContainerID( return true } + // Display name not set on folder if folder.GetDisplayName() == nil { return true