Skip to content

Commit 178bfb7

Browse files
author
Gauvain Pocentek
committed
Handle empty messages from server in exceptions
1 parent 4a73b85 commit 178bfb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitlab/exceptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class to raise. Should be inherited from GitLabError
134134

135135
try:
136136
message = response.json()['message']
137-
except (KeyError, ValueError):
137+
except (KeyError, ValueError, TypeError):
138138
message = response.content
139139

140140
if isinstance(error, dict):

0 commit comments

Comments
 (0)