Skip to content

Commit 86b10d0

Browse files
committed
Check response status
1 parent 428f82c commit 86b10d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

getBitstreams.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def main():
102102
# NOTE: expanding bitstreams to get the count, in case this is an item
103103
endpoint = baseURL+'/rest/handle/'+handle+'?expand=bitstreams'
104104
dsObject = requests.get(endpoint, headers=header, cookies=cookies, verify=verify, timeout=response_timeout).json()
105+
dsObject.raise_for_status() # ensure we notice bad responses
105106
if args.verbose: print dsObject
106107
dsObjectID = dsObject['uuid']
107108
# TODO: extend

0 commit comments

Comments
 (0)