feat(model): Improve error message when model is not configured.

This commit is contained in:
fanlv
2025-07-25 13:18:52 +08:00
parent f3934ccf62
commit 2e2018af7a
6 changed files with 46 additions and 3 deletions

View File

@@ -35,9 +35,16 @@ const (
ErrAgentPublishSingleAgentCode = 100000010
ErrAgentAlreadyBindDatabaseCode = 100000011
ErrAgentExecuteErrCode = 100000012
ErrAgentNoModelInUseCode = 100000013
)
func init() {
code.Register(
ErrAgentNoModelInUseCode,
"there is no llm model in use, please config a model first",
code.WithAffectStability(false),
)
code.Register(
ErrAgentPublishSingleAgentCode,
"publish single agent failed",

View File

@@ -22,12 +22,19 @@ import "github.com/coze-dev/coze-studio/backend/pkg/errorx/code"
const (
ErrAppInvalidParamCode = 101000000
ErrAppPermissionCode = 101000001
ErrAppRecordNotFound = 109000002
ErrAppRecordNotFound = 101000002
ErrAppNoModelInUseCode = 101000003
)
const APPMsgKey = "msg"
func init() {
code.Register(
ErrAppNoModelInUseCode,
"there is no llm model in use, please config a model first",
code.WithAffectStability(false),
)
code.Register(
ErrAppPermissionCode,
"unauthorized access : {msg}",