Skip to content

nasa_api_errors

This is the file that stores all the classes that represent exceptions.

NasaApiDataNotFoundError

Bases: Exception

Represents an exception caused by data not being found in a NASA API request.

Source code in src\nasa_api\nasa_api_errors.py
class NasaApiDataNotFoundError(Exception):
    """
    Represents an exception caused by data not being found in a NASA API
    request.
    """

    def __init__(self, message="The NASA API wrapper has encountered an error"):
        """
        Creates an instance of the NasaApiDataNotFoundError class.

        Args:
            message (str): The message that the exception raises.
        """
        super().__init__(message)

__init__(message='The NASA API wrapper has encountered an error')

Creates an instance of the NasaApiDataNotFoundError class.

Parameters:

Name Type Description Default
message str

The message that the exception raises.

'The NASA API wrapper has encountered an error'
Source code in src\nasa_api\nasa_api_errors.py
def __init__(self, message="The NASA API wrapper has encountered an error"):
    """
    Creates an instance of the NasaApiDataNotFoundError class.

    Args:
        message (str): The message that the exception raises.
    """
    super().__init__(message)