Skip to content

Commit

Permalink
Fix POST response code API handling (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimon222 authored and lresende committed May 29, 2019
1 parent 4c0612d commit c31fcd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yarn_api_client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def request(self, api_path, method='GET', **kwargs):
else:
response = requests.request(method=method, url=api_endpoint, headers=headers, **kwargs)

if response.status_code == requests.codes.ok:
if response.status_code in (200, 202):
return self.response_class(response)
else:
msg = 'Response finished with status: %s. Details: %s' % (response.status_code, response.text)
Expand Down

0 comments on commit c31fcd8

Please sign in to comment.