Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ orders = api.Orders.all(customer_id=customer.id)
### Error handling

Minimal validation of data is performed by the client, instead deferring this to the server.
A `HttpException` will be raised for any unusual status code:
A `HttpException` will be raised for any unusual status code:

* 3xx status code: `RedirectionException`
* 4xx status code: `ClientRequestException`
Expand Down
8 changes: 4 additions & 4 deletions bigcommerce/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class HttpException(Exception):
def __init__(self, msg, res):
super(Exception, self).__init__(msg)
self.response = res

@property
def status_code(self):
return self.response.status_code
Expand All @@ -15,10 +15,10 @@ def headers(self):
@property
def content(self):
return self.response.content

# 204
class EmptyResponseWarning(HttpException): pass

# 4xx codes
class ClientRequestException(HttpException): pass
# class Unauthorised(ClientRequestException): pass
Expand All @@ -38,4 +38,4 @@ class ServerException(HttpException): pass
# 3xx codes
class RedirectionException(HttpException): pass

class NotLoggedInException(Exception): pass
class NotLoggedInException(Exception): pass
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def read(fname):
setup(
name = "bigcommerce",
version = "0.10.2",

packages=find_packages(),
package_data = {'' : ['LICENSE', 'README.md']},
install_requires = ['requests>=2.1.0',
Expand All @@ -19,7 +19,7 @@ def read(fname):
license = "MIT",
keywords = "bigcommerce api client",
url = "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/bigcommerce/bigcommerce-api-python",

long_description=read('README.md'),
classifiers=[
"Development Status :: 3 - Alpha",
Expand Down