MCPcopy
hub / github.com/HisMax/RedInk / validation_error

Function validation_error

backend/routes/utils.py:66–75  ·  view source on GitHub ↗

构造参数校验错误。

(detail: str, suggestion: str = "请检查输入后重试")

Source from the content-addressed store, hash-verified

64
65
66def validation_error(detail: str, suggestion: str = "请检查输入后重试") -> AppError:
67 """构造参数校验错误。"""
68 return AppError(
69 code="INVALID_REQUEST",
70 title="请求参数不完整",
71 detail=detail,
72 suggestion=suggestion,
73 status=400,
74 retryable=False,
75 )
76
77
78def normalize_error_result(result: dict, context: dict = None, fallback_status: int = 500) -> dict:

Callers 9

test_connectionFunction · 0.85
create_historyFunction · 0.85
search_historyFunction · 0.85
generate_imagesFunction · 0.85
retry_single_imageFunction · 0.85
retry_failed_imagesFunction · 0.85
regenerate_imageFunction · 0.85
generate_contentFunction · 0.85
generate_outlineFunction · 0.85

Calls 1

AppErrorClass · 0.90

Tested by 1

test_connectionFunction · 0.68