Commit ce687c9f authored by Giorgos Verigakis's avatar Giorgos Verigakis
Browse files

Improve error reporting in astakos

parent 8f5f3101
......@@ -37,6 +37,14 @@ from . import Client, ClientError
class AstakosClient(Client):
"""GRNet Astakos API client"""
def raise_for_status(self, r):
msg = r.text.strip()
if msg:
raise ClientError(msg, r.status_code)
# Fallback to the default
super(AstakosClient, self).raise_for_status(r)
def authenticate(self):
r = self.get('/im/authenticate')
return r.json
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment