You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
936 B
32 lines
936 B
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
flowroutenumbersandmessaging.exceptions.api_exception
|
|
|
|
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io )
|
|
"""
|
|
|
|
class APIException(Exception):
|
|
|
|
"""Class that handles HTTP Exceptions when fetching API Endpoints.
|
|
|
|
Attributes:
|
|
response_code (int): The status code of the response.
|
|
context (HttpContext): The HttpContext of the API call.
|
|
|
|
"""
|
|
|
|
def __init__(self,
|
|
reason,
|
|
context):
|
|
"""Constructor for the APIException class
|
|
|
|
Args:
|
|
reason (string): The reason (or error message) for the Exception
|
|
to be raised.
|
|
context (HttpContext): The HttpContext of the API call.
|
|
|
|
"""
|
|
super(APIException, self).__init__(reason)
|
|
self.context = context
|
|
self.response_code = context.response.status_code
|
|
|