feat: 完善api错误提示

This commit is contained in:
tbphp
2025-07-03 21:33:16 +08:00
parent 745c646530
commit c0594d068e
10 changed files with 127 additions and 220 deletions

View File

@@ -176,7 +176,7 @@ func (m *Manager) Validate() error {
for _, err := range validationErrors {
logrus.Errorf(" - %s", err)
}
return errors.NewAppErrorWithDetails(errors.ErrConfigValidation, "Configuration validation failed", strings.Join(validationErrors, "; "))
return errors.NewAPIError(errors.ErrValidation, strings.Join(validationErrors, "; "))
}
return nil