Errors#
- exception fitrequest.errors.FitRequestConfigurationError[source]#
Bases:
ValueErrorBase fitrequest configuration error.
- exception fitrequest.errors.FitRequestRuntimeError[source]#
Bases:
RuntimeErrorBase fitrequest runtime error.
- exception fitrequest.errors.UnrecognizedParametersError(method_name: str, unrecognized_arguments: set[str])[source]#
Bases:
FitRequestConfigurationErrorUnrecognized parameters: the following are neither arguments of the current generated method nor valid httpx.request arguments
- method_name: str#
- unrecognized_arguments: set[str]#
- exception fitrequest.errors.UrlRequestTooLongError(url: str, url_size: int, url_size_limit: int = 4094)[source]#
Bases:
FitRequestRuntimeErrorTriggered when the length of the requested URL exceeds the maximum allowed limit.
- url: str#
- url_size: int#
- url_size_limit: int = 4094#
- exception fitrequest.errors.InvalidMethodDecoratorError(provided_decorator: str)[source]#
Bases:
FitRequestConfigurationErrorException raised when the specified method decorator is either not a valid callable or cannot be retrieved from the global environment using the given name.
- provided_decorator: str#
- exception fitrequest.errors.UnexpectedNoneBaseURLError[source]#
Bases:
FitRequestConfigurationErrorRaised when neither MethodConfig nor MethodConfigGroup specifies the base_url attribute.
- exception fitrequest.errors.FitDecoratorInvalidUsageError[source]#
Bases:
FitRequestConfigurationErrorRaised when the @fit decorator is applied to methods that do not belong to a class inheriting from FitRequest.
- exception fitrequest.errors.MultipleAuthenticationError[source]#
Bases:
FitRequestConfigurationErrorRaised when more than one authentication method is detected. The user should provide only a single valid authentication method for the request.
- exception fitrequest.errors.HttpVerbNotProvidedError[source]#
Bases:
FitRequestConfigurationErrorThis exception is raised to indicate that a required HTTP verb has not been specified in the MethodConfigFamily configuration. The user should ensure that an appropriate HTTP verb (such as GET, POST, PUT, PATCH, DELETE) is provided.
- exception fitrequest.errors.UnexpectedLiteralTypeError(bad_type: type)[source]#
Bases:
FitRequestRuntimeErrorThis exception is raised when an unexpected type is provided instead of a Literal type. During CLI generation, Literal types are converted to Enums to ensure compatibility with the typer library.
- bad_type: type#
- exception fitrequest.errors.InvalidParamsTypeError(provided_params: Any)[source]#
Bases:
FitRequestConfigurationErrorException raised when the specified parameters have an incorrect type.
- provided_params: Any#
- exception fitrequest.errors.InvalidResponseTypeError(provided_model: Any)[source]#
Bases:
FitRequestConfigurationErrorException raised when the specified response model have an incorrect type.
- provided_model: Any#