feat: enhance error handling with internationalized messages across services and locales

This commit is contained in:
mlogclub
2026-06-02 21:10:17 +08:00
parent 0b4a1b4594
commit 5b6c54de34
14 changed files with 109 additions and 42 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ func BuildQRCodeLoginURL(state string) (string, error) {
func CreateState(next string) (string, error) {
secret := strings.TrimSpace(StateSecret())
if secret == "" {
return "", errorsx.BusinessError(1, "企业微信登录密钥未配置")
return "", errorsx.BusinessErrorI18n(1, "error.wxwork.loginSecretMissing")
}
payload := statePayload{
Next: sanitizeNextPath(next),