Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 08c01b6

Browse files
committed
error cleanup
1 parent 862678e commit 08c01b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ func (s *Server) indexMetaTagRecordUpsert(ctx *middleware.Context, req models.In
522522

523523
result, created, err := s.MetricIndex.MetaTagRecordUpsert(req.OrgId, record)
524524
if err != nil {
525-
response.Write(ctx, response.NewError(http.StatusBadRequest, err.Error()))
525+
response.Write(ctx, response.WrapError(err))
526526
return
527527
}
528528

idx/memory/memory.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ func (m *UnpartitionedMemoryIdx) MetaTagRecordUpsert(orgId uint32, rawRecord idx
380380
res := idx.MetaTagRecord{}
381381

382382
if !TagSupport {
383-
log.Warn("memory-idx: received tag query, but tag support is disabled")
384-
return res, false, errors.NewInternal("Tag support is disabled")
383+
log.Warn("memory-idx: received meta-tag query, but tag support is disabled")
384+
return res, false, errors.NewBadRequest("Tag support is disabled")
385385
}
386386

387387
var mtr metaTagRecords

0 commit comments

Comments
 (0)