Browse Source

log tcp error

Paul 4 years ago
parent
commit
7b9f9f7a53
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      request/tr/tr.go

+ 5
- 0
request/tr/tr.go View File

@@ -1,6 +1,7 @@
1 1
 package tr
2 2
 
3 3
 import (
4
+	"github.com/sirupsen/logrus"
4 5
 	"github.com/wpajqz/linker"
5 6
 )
6 7
 
@@ -49,6 +50,10 @@ func Fail(ctx linker.Context, err error) bool {
49 50
 		status = v.Status
50 51
 	}
51 52
 
53
+	if status == linker.StatusInternalServerError {
54
+		logrus.Error(err)
55
+	}
56
+
52 57
 	ctx.Error(status, err.Error())
53 58
 
54 59
 	return true