gitlab.lister: Break asap when problem exists during fetch info
Prior to this, when wrong url injection happens, no information is fetched because we have bad input in the first place (404, 400). This makes the debugging session quite hard.
This commit is contained in:
parent
ae514a84c4
commit
8f5b10b3a3
1 changed files with 3 additions and 0 deletions
|
@ -110,6 +110,9 @@ class GitLabLister(PageByPageHttpLister):
|
|||
|
||||
"""
|
||||
response = self.transport_head(identifier=1)
|
||||
if not response.ok:
|
||||
raise ValueError(
|
||||
'Problem during information fetch: %s' % response.status_code)
|
||||
h = response.headers
|
||||
return (self._get_int(h, 'x-total'),
|
||||
self._get_int(h, 'x-total-pages'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue