Skip to content

Commit 0b66437

Browse files
authored
Merge pull request #1 from muralisrini/checkretheaders
check existence of expected headers
2 parents 6b53564 + 51b0f89 commit 0b66437

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/manetu/gitlab/api.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
(m/map-vals #(Integer/parseInt %) $))]
5252
(when (and (>= status 200) (< status 400))
5353
(let [acc (concat acc body)]
54-
(if (>= x-page x-total-pages)
55-
acc
54+
(if (or (nil? x-total-pages) (nil? x-page) (>= x-page x-total-pages))
55+
(do
56+
(log/debug "invoke-allpages complete x-total-pages:" x-total-pages "x-page:" x-page)
57+
acc)
5658
(recur acc (inc x-page))))))))

0 commit comments

Comments
 (0)