diff --git a/gotsrpc.go b/gotsrpc.go index 5543348..566cdb1 100644 --- a/gotsrpc.go +++ b/gotsrpc.go @@ -114,6 +114,7 @@ func Reply(response []interface{}, stats *CallStats, r *http.Request, w http.Res if v, ok := errResp.(error); ok && v != nil { if !reflect.ValueOf(v).IsNil() { stats.ErrorCode = 1 + stats.ErrorType = fmt.Sprintf("%T", v) stats.ErrorMessage = v.Error() if v, ok := v.(interface { ErrorCode() int diff --git a/stats.go b/stats.go index 4a4c08e..36b924b 100644 --- a/stats.go +++ b/stats.go @@ -12,5 +12,6 @@ type CallStats struct { RequestSize int ResponseSize int ErrorCode int + ErrorType string ErrorMessage string }