fix(server): Replace ErrorResponses with standard McpErrors
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
# Base models
|
||||
from .base import (
|
||||
BaseResponse,
|
||||
ErrorResponse,
|
||||
SuccessResponse,
|
||||
IdResponse,
|
||||
StatusResponse,
|
||||
@@ -82,7 +81,6 @@ from .webdav import (
|
||||
__all__ = [
|
||||
# Base models
|
||||
"BaseResponse",
|
||||
"ErrorResponse",
|
||||
"SuccessResponse",
|
||||
"IdResponse",
|
||||
"StatusResponse",
|
||||
|
||||
@@ -35,17 +35,6 @@ class BaseResponse(BaseModel):
|
||||
return iso_string
|
||||
|
||||
|
||||
class ErrorResponse(BaseResponse):
|
||||
"""Response model for error cases."""
|
||||
|
||||
success: bool = Field(default=False, description="Always False for error responses")
|
||||
error: str = Field(description="Error message")
|
||||
error_code: Optional[str] = Field(None, description="Optional error code")
|
||||
details: Optional[Dict[str, Any]] = Field(
|
||||
None, description="Additional error details"
|
||||
)
|
||||
|
||||
|
||||
class SuccessResponse(BaseResponse):
|
||||
"""Generic success response."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user