diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6de658c --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1f7e133 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# edfi_api_client v0.1.1 +## Fixes +- retry on 500 errors + +# edfi_api_client v0.1.0 +Initial release \ No newline at end of file diff --git a/edfi_api_client/edfi_endpoint.py b/edfi_api_client/edfi_endpoint.py index 9079b56..f4b8f85 100644 --- a/edfi_api_client/edfi_endpoint.py +++ b/edfi_api_client/edfi_endpoint.py @@ -254,6 +254,10 @@ def custom_raise_for_status(response): "404: Resource not found.", response=response ) + elif response.status_code == 500: + raise RequestsWarning( + "500: Internal server error." + ) elif response.status_code == 504: raise RequestsWarning( "504: Gateway time-out for URL. The connection may need to be reset." diff --git a/setup.py b/setup.py index a63caf4..b9ae369 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name='edfi_api_client', - version='0.1.0', + version='0.1.1', description='Ed-Fi API client and tools', license_files=['LICENSE'], url='https://github.com/edanalytics/edfi_api_client',