How to use the amadeus.client.errors.ResponseError function in amadeus

To help you get started, we’ve selected a few amadeus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amadeus4dev / amadeus-python / amadeus / client / errors.py View on Github external
# PRIVATE

    # extracts the error description from the response, if it exists
    def __determine_description(self):
        if (self.response and self.response.parsed):
            if 'errors' in self.response.result:
                return self.response.result['errors']
            if 'error_description' in self.response.result:
                return self.response.result

    # sets the error code to the name of this class
    def __determine_code(self):
        return self.__class__.__name__


class NetworkError(ResponseError):
    """
    This error occurs when there is some kind of error in the network
    """
    pass


class ParserError(ResponseError):
    """
    This error occurs when the response type was JSOn but could not be parsed
    """
    pass


class ServerError(ResponseError):
    """
    This error occurs when there is an error on the server
github amadeus4dev / amadeus-python / amadeus / client / errors.py View on Github external
class ServerError(ResponseError):
    """
    This error occurs when there is an error on the server
    """
    pass


class ClientError(ResponseError):
    """
    This error occurs when the client did not provide the right parameters
    """
    pass


class AuthenticationError(ResponseError):
    """
    This error occurs when the client did not provide the right credentials
    """
    pass


class NotFoundError(ResponseError):
    """
    This error occurs when the path could not be found
    """
    pass
github amadeus4dev / amadeus-python / amadeus / client / errors.py View on Github external
class ParserError(ResponseError):
    """
    This error occurs when the response type was JSOn but could not be parsed
    """
    pass


class ServerError(ResponseError):
    """
    This error occurs when there is an error on the server
    """
    pass


class ClientError(ResponseError):
    """
    This error occurs when the client did not provide the right parameters
    """
    pass


class AuthenticationError(ResponseError):
    """
    This error occurs when the client did not provide the right credentials
    """
    pass


class NotFoundError(ResponseError):
    """
    This error occurs when the path could not be found
github amadeus4dev / amadeus-python / amadeus / client / errors.py View on Github external
class ClientError(ResponseError):
    """
    This error occurs when the client did not provide the right parameters
    """
    pass


class AuthenticationError(ResponseError):
    """
    This error occurs when the client did not provide the right credentials
    """
    pass


class NotFoundError(ResponseError):
    """
    This error occurs when the path could not be found
    """
    pass
github amadeus4dev / amadeus-python / amadeus / client / errors.py View on Github external
if 'error_description' in self.response.result:
                return self.response.result

    # sets the error code to the name of this class
    def __determine_code(self):
        return self.__class__.__name__


class NetworkError(ResponseError):
    """
    This error occurs when there is some kind of error in the network
    """
    pass


class ParserError(ResponseError):
    """
    This error occurs when the response type was JSOn but could not be parsed
    """
    pass


class ServerError(ResponseError):
    """
    This error occurs when there is an error on the server
    """
    pass


class ClientError(ResponseError):
    """
    This error occurs when the client did not provide the right parameters
github amadeus4dev / amadeus-python / amadeus / client / errors.py View on Github external
class NetworkError(ResponseError):
    """
    This error occurs when there is some kind of error in the network
    """
    pass


class ParserError(ResponseError):
    """
    This error occurs when the response type was JSOn but could not be parsed
    """
    pass


class ServerError(ResponseError):
    """
    This error occurs when there is an error on the server
    """
    pass


class ClientError(ResponseError):
    """
    This error occurs when the client did not provide the right parameters
    """
    pass


class AuthenticationError(ResponseError):
    """
    This error occurs when the client did not provide the right credentials