Skip to content

Commit cf9c7c3

Browse files
committed
Fixed raise_exception to type check exception_fields input
1 parent 56320bd commit cf9c7c3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎stream/client.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,19 @@ def raise_exception(self, result, status_code):
178178
from stream.exceptions import get_exception_dict
179179
exception_class = exceptions.StreamApiException
180180

181+
print 'THERES JOHHNY'
182+
181183
def errors_from_fields(exception_fields):
182184
result = []
185+
if not isinstance(exception_fields, list):
186+
return exception_fields
187+
183188
for field, errors in exception_fields.items():
184189
errors.append('Field "%s" errors: %s' % (field, repr(errors)))
185190
return result
186191

187192
if result is not None:
193+
print result
188194
error_message = result['detail']
189195
exception_fields = result.get('exception_fields')
190196
if exception_fields is not None:

0 commit comments

Comments
 (0)