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

Commit b6e1f22

Browse files
committed
more userfriendly error
1 parent a2a716c commit b6e1f22

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

api/dataprocessor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ func newRequestContext(ctx context.Context, req *models.Req, consolidator consol
682682
// we can argue both ways, but the other thing is that if we apply the logic above, we end up with:
683683
// from := 1
684684
// to := 1
685-
// which is a query not accepted by AggMetric, Ccache or store. (from must < to)
685+
// which is a query not accepted by AggMetric, Ccache or store. (from must be less than to)
686686
// the only way we can get acceptable queries is for from to be 1 and to to remain 36 (or become 60 or 61)
687687
// such a fetch request would include the requested point
688688
// but we know Fix() will later create the output according to these rules:

mdata/aggmetric.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"gopkg.in/raintank/schema.v1"
1717
)
1818

19-
var ErrInvalidRange = errors.New("AggMetric: invalid range. from must < to")
19+
var ErrInvalidRange = errors.New("AggMetric: invalid range: from must be less than to")
2020
var ErrNilChunk = errors.New("AggMetric: unexpected nil chunk")
2121

2222
// AggMetric takes in new values, updates the in-memory data and streams the points to aggregators

mdata/cache/ccache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
var (
2121
maxSize uint64
2222
searchFwdBug = stats.NewCounter32("recovered_errors.cache.metric.searchForwardBug")
23-
ErrInvalidRange = errors.New("CCache: invalid range. from must < to")
23+
ErrInvalidRange = errors.New("CCache: invalid range: from must be less than to")
2424
)
2525

2626
func init() {

store/cassandra/store_cassandra.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const Table_name_format = `metric_%d`
3434

3535
var (
3636
errChunkTooSmall = errors.New("unpossibly small chunk in cassandra")
37-
errInvalidRange = errors.New("CassandraStore: invalid range. from must < to")
37+
errInvalidRange = errors.New("CassandraStore: invalid range: from must be less than to")
3838
errReadQueueFull = errors.New("the read queue is full")
3939
errReadTooOld = errors.New("the read is too old")
4040
errTableNotFound = errors.New("table for given TTL not found")

0 commit comments

Comments
 (0)