mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-28 16:36:36 +08:00
优化错误处理相关代码
This commit is contained in:
@@ -324,7 +324,7 @@ func (this *Node) syncConfig(taskVersion int64) error {
|
||||
if os.IsNotExist(clusterErr) {
|
||||
return errors.New("can not find config file 'configs/api.yaml'")
|
||||
}
|
||||
return errors.New("check cluster config failed: " + clusterErr.Error())
|
||||
return fmt.Errorf("check cluster config failed: %w", clusterErr)
|
||||
}
|
||||
} else {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user