Skip to content

Commit

Permalink
fix(client): add raise_for_status()
Browse files Browse the repository at this point in the history
Drive-by commit to make the client raise an Exception if a request to
caluma fails.
  • Loading branch information
open-dynaMIX committed Aug 19, 2019
1 parent 7145045 commit 7883f22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions caluma_interval/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ def _send(self, query, variables):
headers["Authorization"] = f"Bearer {token['access_token']}"

response = requests.post(self.endpoint, json=data, headers=headers)
response.raise_for_status()
return response.json()
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
command: -p ${DATABASE_PORT:-5432}

caluma:
image: projectcaluma/caluma:latest@sha256:ec73722c9d40e3786309de7d3885bef80558932bbfdf0b34701b11d997241e8a
image: projectcaluma/caluma:latest@sha256:2b6a219a720b53d87026becd79918ba04b8f047f52371564667debdea9515517
ports:
- "8000:8000"
depends_on:
Expand Down

0 comments on commit 7883f22

Please sign in to comment.