connectordb/_connection.py
def handleresult(self, r):
        """Handles HTTP error codes for the given request

        Raises:
            AuthenticationError on the appropriate 4** errors
            ServerError if the response is not an ok (2**)

        Arguments:
            r -- The request result
        """
        if r.status_code >= 400 and r.status_code < 500:
            msg = r.json()
            raise AuthenticationError(str(msg["code"]) + ": " + msg["msg"] +
                                      " (" + msg["ref"] + ")")
        elif r.status_code > 300:
            err = None
            try:
                msg = r.json()
                err = ServerError(str(msg["code"]) + ": " + msg["msg"] + " (" +
                                  msg["ref"] + ")")
            except:
                raise ServerError(
                    "Server returned error, but did not give a valid error message")
            raise err
        return r
def handleresult(self, r):
        if r.status_code >= 400 and r.status_code < 500:
            msg = r.json()
            raise AuthenticationError(str(msg["code"]) + ": " + msg["msg"] +
                                      " (" + msg["ref"] + ")")
        elif r.status_code > 300:
            err = None
            try:
                msg = r.json()
                err = ServerError(str(msg["code"]) + ": " + msg["msg"] + " (" +
                                  msg["ref"] + ")")
            except:
                raise ServerError(
                    "Server returned error, but did not give a valid error message")
            raise err
        return r
def handleresult ( self , r ) : if r . status_code >= 400 and r . status_code < 500 : msg = r . json ( ) raise AuthenticationError ( str ( msg [ "code" ] ) + ": " + msg [ "msg" ] + " (" + msg [ "ref" ] + ")" ) elif r . status_code > 300 : err = None try : msg = r . json ( ) err = ServerError ( str ( msg [ "code" ] ) + ": " + msg [ "msg" ] + " (" + msg [ "ref" ] + ")" ) except : raise ServerError ( "Server returned error, but did not give a valid error message" ) raise err return r
Handles HTTP error codes for the given request

        Raises:
            AuthenticationError on the appropriate 4** errors
            ServerError if the response is not an ok (2**)

        Arguments:
            r -- The request result
Handles HTTP error codes for the given request