From fe18e85e365bdc1b6d4e4bf987db752aeaa926c7 Mon Sep 17 00:00:00 2001 From: Vishal Sharma Date: Thu, 5 May 2022 11:11:35 +0530 Subject: [PATCH] fix: error and exception type error (#1086) --- pkg/query-service/app/clickhouseReader/reader.go | 2 +- pkg/query-service/model/response.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.go index 215b9bdfd8..ba95aa2a30 100644 --- a/pkg/query-service/app/clickhouseReader/reader.go +++ b/pkg/query-service/app/clickhouseReader/reader.go @@ -2532,7 +2532,7 @@ func (r *ClickHouseReader) GetErrorForType(ctx context.Context, queryParams *mod if len(getErrorWithSpanReponse) > 0 { return &getErrorWithSpanReponse[0], nil } else { - return nil, &model.ApiError{Typ: model.ErrorNotFound, Err: fmt.Errorf("Error not found")} + return nil, &model.ApiError{Typ: model.ErrorUnavailable, Err: fmt.Errorf("Error/Exception not found")} } } diff --git a/pkg/query-service/model/response.go b/pkg/query-service/model/response.go index 602f8e20be..7df195dcc8 100644 --- a/pkg/query-service/model/response.go +++ b/pkg/query-service/model/response.go @@ -321,7 +321,7 @@ type SpanFiltersResponse struct { type Error struct { ExceptionType string `json:"exceptionType" ch:"exceptionType"` ExceptionMsg string `json:"exceptionMessage" ch:"exceptionMessage"` - ExceptionCount int64 `json:"exceptionCount" ch:"exceptionCount"` + ExceptionCount uint64 `json:"exceptionCount" ch:"exceptionCount"` LastSeen time.Time `json:"lastSeen" ch:"lastSeen"` FirstSeen time.Time `json:"firstSeen" ch:"firstSeen"` ServiceName string `json:"serviceName" ch:"serviceName"`