Refactor error handling in services to use internationalized error messages

- Updated OSSStorage validation errors to use internationalized messages.
- Changed error messages in provider.go for unsupported file storage types.
- Refactored tag_service.go to replace hardcoded error messages with internationalized versions.
- Updated ticket_service.go to use internationalized error messages for various validation checks.
- Refactored ticket_tag_service.go to use internationalized error messages for tag validation.
- Changed ticket_view_service.go to use internationalized error messages for view validation.
- Updated tool_catalog_service.go to use internationalized error messages for tool code validation.
- Refactored user_service.go to replace error messages with internationalized versions.
- Updated ws_service.go to use internationalized error messages for WebSocket handling.
- Refactored wxwork_kf_inbound_service.go to use internationalized error messages for message handling.
- Updated wxwork_kf_outbound_service.go to use internationalized error messages for outbound message handling.
- Refactored wxwork_login_service.go to use internationalized error messages for login handling.
- Updated login.go in wxwork package to use internationalized error messages for login state and ticket validation.
This commit is contained in:
mlogclub
2026-06-02 20:51:13 +08:00
parent 77be1b4f5e
commit 0b4a1b4594
103 changed files with 1688 additions and 1350 deletions
+3 -4
View File
@@ -6,6 +6,7 @@ require (
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/cloudwego/eino v0.8.7
github.com/cloudwego/eino-ext/components/model/openai v0.1.11
github.com/coreos/go-oidc/v3 v3.18.0
github.com/eino-contrib/jsonschema v1.0.3
github.com/gin-gonic/gin v1.12.0
github.com/glebarez/sqlite v1.11.0
@@ -19,10 +20,8 @@ require (
github.com/mlogclub/codegen v1.0.3
github.com/mlogclub/simple v1.2.40
github.com/modelcontextprotocol/go-sdk v1.4.1
github.com/nicksnyder/go-i18n/v2 v2.6.1
github.com/openai/openai-go/v3 v3.28.0
github.com/panjf2000/ants/v2 v2.12.0
github.com/pelletier/go-toml/v2 v2.2.4
github.com/qdrant/go-client v1.17.1
github.com/robfig/cron/v3 v3.0.1
github.com/silenceper/wechat/v2 v2.1.12
@@ -32,6 +31,7 @@ require (
github.com/yuin/goldmark v1.4.13
golang.org/x/crypto v0.49.0
golang.org/x/net v0.51.0
golang.org/x/oauth2 v0.36.0
golang.org/x/text v0.35.0
golang.org/x/tools v0.42.0
gopkg.in/yaml.v3 v3.0.1
@@ -51,7 +51,6 @@ require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudwego/base64x v0.1.6 // indirect
github.com/cloudwego/eino-ext/libs/acl/openai v0.1.15 // indirect
github.com/coreos/go-oidc/v3 v3.18.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/evanphx/json-patch v0.5.2 // indirect
@@ -83,6 +82,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nikolalohinski/gonja v1.5.3 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/quic-go/qpack v0.6.0 // indirect
github.com/quic-go/quic-go v0.59.0 // indirect
@@ -109,7 +109,6 @@ require (
golang.org/x/arch v0.22.0 // indirect
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/time v0.14.0 // indirect