refactor(LLM): 列表无可用模型时复用 AgcModelResolveError 的错误码
- public_model_catalog 里硬编码的 MODEL_UNAVAILABLE 与 AgcModelResolveError::Unavailable.code() 重复 - 改为直接取枚举 code(),与 MODEL_ACCESS_UNAVAILABLE 的既有做法一致,避免两处字符串漂移
This commit is contained in:
@@ -281,7 +281,7 @@ fn public_model_catalog(
|
||||
.default_model_id_for(access)
|
||||
.ok_or_else(|| {
|
||||
AppError::from_status(StatusCode::SERVICE_UNAVAILABLE)
|
||||
.with_code("MODEL_UNAVAILABLE")
|
||||
.with_code(AgcModelResolveError::Unavailable.code())
|
||||
.with_message("当前会员档位没有可用模型")
|
||||
})?
|
||||
.to_string();
|
||||
|
||||
Reference in New Issue
Block a user