Skip to content

Commit

Permalink
Correct some error handlings (#8000)
Browse files Browse the repository at this point in the history
fix #7954

Signed-off-by: seiya <[email protected]>
  • Loading branch information
seiyab authored Apr 29, 2024
1 parent 8cbe5b1 commit f469726
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/alertmanager/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (am *Alertmanager) ApplyConfig(userID string, conf *config.Config, rawCfg s
return notifier
})
if err != nil {
return nil
return err
}

timeIntervals := make(map[string][]timeinterval.TimeInterval, len(conf.MuteTimeIntervals)+len(conf.TimeIntervals))
Expand Down
2 changes: 1 addition & 1 deletion pkg/ruler/remotequerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (q *RemoteQuerier) Query(ctx context.Context, qs string, t time.Time) (prom
func (q *RemoteQuerier) query(ctx context.Context, query string, ts time.Time, logger log.Logger) (promql.Vector, error) {
req, err := q.createRequest(ctx, query, ts)
if err != nil {
return promql.Vector{}, nil
return promql.Vector{}, err
}

ctx, cancel := context.WithTimeout(ctx, q.timeout)
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/tsdb/block/block_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func GenerateBlockFromSpec(storageDir string, specs SeriesSpecs) (_ *Meta, retur

chunkwClosed = true
if err := chunkw.Close(); err != nil {
return nil, nil
return nil, err
}

// Write index.
Expand Down

0 comments on commit f469726

Please sign in to comment.