diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.go index 7a93791333..a8b60c4503 100644 --- a/pkg/query-service/app/clickhouseReader/reader.go +++ b/pkg/query-service/app/clickhouseReader/reader.go @@ -2503,7 +2503,7 @@ func (r *ClickHouseReader) GetErrorForId(ctx context.Context, queryParams *model if len(getErrorWithSpanReponse) > 0 { return &getErrorWithSpanReponse[0], nil } else { - return nil, &model.ApiError{Typ: model.ErrorNotFound, Err: fmt.Errorf("Error ID not found")} + return &model.ErrorWithSpan{}, &model.ApiError{Typ: model.ErrorNotFound, Err: fmt.Errorf("Error ID not found")} } } diff --git a/pkg/query-service/model/response.go b/pkg/query-service/model/response.go index 7df195dcc8..959e2b23d4 100644 --- a/pkg/query-service/model/response.go +++ b/pkg/query-service/model/response.go @@ -328,15 +328,15 @@ type Error struct { } type ErrorWithSpan struct { - ErrorID string `json:"errorId" ch:"errorID"` - ExceptionType string `json:"exceptionType" ch:"exceptionType"` - ExcepionStacktrace string `json:"excepionStacktrace" ch:"excepionStacktrace"` - ExceptionEscaped string `json:"exceptionEscaped" ch:"exceptionEscaped"` - ExceptionMsg string `json:"exceptionMessage" ch:"exceptionMessage"` - Timestamp time.Time `json:"timestamp" ch:"timestamp"` - SpanID string `json:"spanID" ch:"spanID"` - TraceID string `json:"traceID" ch:"traceID"` - ServiceName string `json:"serviceName" ch:"serviceName"` - NewerErrorID string `json:"newerErrorId" ch:"newerErrorId"` - OlderErrorID string `json:"olderErrorId" ch:"olderErrorId"` + ErrorID string `json:"errorId" ch:"errorID"` + ExceptionType string `json:"exceptionType" ch:"exceptionType"` + ExceptionStacktrace string `json:"exceptionStacktrace" ch:"exceptionStacktrace"` + ExceptionEscaped string `json:"exceptionEscaped" ch:"exceptionEscaped"` + ExceptionMsg string `json:"exceptionMessage" ch:"exceptionMessage"` + Timestamp time.Time `json:"timestamp" ch:"timestamp"` + SpanID string `json:"spanID" ch:"spanID"` + TraceID string `json:"traceID" ch:"traceID"` + ServiceName string `json:"serviceName" ch:"serviceName"` + NewerErrorID string `json:"newerErrorId" ch:"newerErrorId"` + OlderErrorID string `json:"olderErrorId" ch:"olderErrorId"` }