Exceptions
RAConfigError
¶
Bases: RAError
Represents an error related to configuration issues.
This class inherits from RAError and is used to denote errors specifically arising from configuration sources. It allows specifying a configuration source and an optional detailed error message for better context.
Attributes:
| Name | Type | Description |
|---|---|---|
config_source |
str | None
|
The source of the configuration that caused the error. Can be None if not specified. |
message |
str | None
|
Optional detailed error message providing additional context about the configuration issue. |
RAError
¶
Bases: Exception
Custom exception class for handling Review Assist (RA) specific errors.
This exception is intended to encapsulate errors specific to the RA application, providing customisation and clearer distinction from generic exceptions.
You should not use it directly. Instead, use one of the subclasses: - RAInferenceError: for errors related to inference backend provider. - RAConfigError: for errors related to configuration issues. - RAGitServerError: for errors related to communication with a Git server. - RAArgumentsError: for errors related to argument parsing. - RAConsoleError: for errors related to the console user interface. - RARepositoryError: for errors related to repository operations.
Create a new subclass if none of the above fits your needs.
RAGitServerError
¶
Bases: Exception
Exception raised for errors related to communication with a Git server.
This class is used to provide detailed exception information when an error occurs while interacting with a Git server. It encapsulates details about the base URL, API path, HTTP method, and an additional message related to the error.
Attributes:
| Name | Type | Description |
|---|---|---|
base_url |
The base URL of the Git server. |
|
api_path |
The API path of the request that caused the error. |
|
method |
The HTTP method of the request (e.g., GET, POST). |
|
message |
Additional details about the error. |
RAInferenceError
¶
Bases: RAError
Represents an error specific to inference from a particular backend provider.
This exception is raised when an inference operation fails on a specified backend provider and/or model. It is designed to encapsulate details about the backend provider, the model involved, and an optional error message for more context.
Attributes:
| Name | Type | Description |
|---|---|---|
backend |
Literal['lmstudio', 'openai']
|
The backend provider responsible for the inference error. |
model |
str
|
The model associated with the inference process that resulted in an error. Can be None if not specified. |
message |
str
|
Additional information or description of the error. Can be None if the error message is not provided. |