Skip to content

Commit 0877119

Browse files
author
Gonchik Tsymzhitov
committed
Add wrapp of Exceptions
1 parent 597d911 commit 0877119

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

atlassian/rest_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ def post(self, path, data=None, headers=None, files=None, params=None, trailing=
198198
except ValueError:
199199
log.debug('Received response with no content')
200200
return None
201+
except Exception as e:
202+
log.error(e)
203+
return None
201204

202205
def put(self, path, data=None, headers=None, files=None, trailing=None, params=None):
203206
response = self.request('PUT', path=path, data=data, headers=headers, files=files, params=params,
@@ -209,6 +212,9 @@ def put(self, path, data=None, headers=None, files=None, trailing=None, params=N
209212
except ValueError:
210213
log.debug('Received response with no content')
211214
return None
215+
except Exception as e:
216+
log.error(e)
217+
return None
212218

213219
def delete(self, path, data=None, headers=None, params=None, trailing=None):
214220
"""
@@ -225,3 +231,6 @@ def delete(self, path, data=None, headers=None, params=None, trailing=None):
225231
except ValueError:
226232
log.debug('Received response with no content')
227233
return None
234+
except Exception as e:
235+
log.error(e)
236+
return None

0 commit comments

Comments
 (0)