archiTop/deck_fetcher/archidekt.py
def _handle_response(response: requests.Response):
        """Handles response from archidekt api, validating request was successful.

        Raises:
            DeckFetcherError: When invalid status code was encountered in response from api

        Args:
            response:   Response object from archidekt api call
        """
        try:
            response.raise_for_status()

        except requests.HTTPError as e:
            try:
                error_message = response.json()['error']

            except Exception:
                error_message = e

            raise DeckFetcherError(f'Failed to fetch archidekt deck with error:\n{error_message}')
Handles response from archidekt api, validating request was successful.

        Raises:
            DeckFetcherError: When invalid status code was encountered in response from api

        Args:
            response:   Response object from archidekt api call
        
Handles response from archidekt api, validating request was successful.
Handles response from archidekt api validating request was successful .
def _handle_response(response: requests.Response):
        try:
            response.raise_for_status()
        except requests.HTTPError as e:
            try:
                error_message = response.json()['error']
            except Exception:
                error_message = e
            raise DeckFetcherError(f'Failed to fetch archidekt deck with error:\n{error_message}')
def _handle_response ( response : requests . Response ) : try : response . raise_for_status ( ) except requests . HTTPError as e : try : error_message = response . json ( ) [ 'error' ] except Exception : error_message = e raise DeckFetcherError ( f'Failed to fetch archidekt deck with error:\n{error_message}' )
Handles response from archidekt api, validating request was successful.
Handles response from archidekt api validating request was successful .
"""Handles response from archidekt api, validating request was successful.

        Raises:
            DeckFetcherError: When invalid status code was encountered in response from api

        Args:
            response:   Response object from archidekt api call
        """
When invalid status code was encountered in response from api
When invalid status code was encountered in response from api
DeckFetcherError
response
requests.Response
Response object from archidekt api call
Response object from archidekt api call