Skip to content

Commit

Permalink
rename APIErrorModel -> ErrorModel
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-i committed Nov 16, 2023
1 parent 7680760 commit c3b0141
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/jupyter_ai/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from deepmerge import always_merger as Merger
from jsonschema import Draft202012Validator as Validator
from jupyter_ai.models import (
APIErrorModel,
ErrorModel,
DescribeConfigResponse,
GlobalConfig,
UpdateConfigRequest,
Expand Down Expand Up @@ -222,7 +222,7 @@ def _validate_lm_em_id(self, config):

def _handle_validation_error(self, e: ValidationError):
formatted_error = _format_validation_errors(e)
self._config_error = APIErrorModel(
self._config_error = ErrorModel(
type="ValidationError",
message="Configuration validation failed",
details=formatted_error,
Expand Down
6 changes: 3 additions & 3 deletions packages/jupyter-ai/jupyter_ai/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class GlobalConfig(BaseModel):
api_keys: Dict[str, str]


class APIErrorModel(BaseModel):
type: str = "APIError"
message: str
class ErrorModel(BaseModel):
type: str = None
message: str = None
details: str = None

0 comments on commit c3b0141

Please sign in to comment.