Browse Source

fix: wrap error with parameters in GetError method of ControlResult

Jacky 1 tháng trước cách đây
mục cha
commit
b4553e61ad
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      internal/nginx/control.go

+ 1 - 2
internal/nginx/control.go

@@ -1,7 +1,6 @@
 package nginx
 
 import (
-	"errors"
 	"net/http"
 	"strings"
 
@@ -58,7 +57,7 @@ func (t *ControlResult) GetOutput() string {
 }
 
 func (t *ControlResult) GetError() error {
-	return errors.New(t.GetOutput())
+	return cosy.WrapErrorWithParams(ErrNginx, t.GetOutput())
 }
 
 func (t *ControlResult) GetLevel() int {