Source code for foundry_dev_tools.errors.config

"""Foundry DevTools configuration custom exceptions."""

from __future__ import annotations

from foundry_dev_tools.errors.meta import FoundryDevToolsError


[docs] class FoundryConfigError(FoundryDevToolsError): """Error meta class for all config related Errors."""
[docs] def __init__(self, *args) -> None: super().__init__( *args, "For more information see: https://emdgroup.github.io/foundry-dev-tools/getting_started/installation.html", )
[docs] class MissingCredentialsConfigError(FoundryConfigError): """Error if no credentials config is available."""
[docs] def __init__(self) -> None: super().__init__( "To create a FoundryContext you need to provide a credentials config.\n" "Either through the token_provider parameter or through the config file.", )
[docs] class TokenProviderConfigError(FoundryConfigError): """Error if the credentials config is invalid."""
[docs] def __init__(self, *args) -> None: super().__init__(*args)
[docs] class MissingFoundryHostError(TokenProviderConfigError): """Raised when the domain is not in the config."""
[docs] def __init__(self) -> None: super().__init__("A domain is missing in your credentials configuration.")