Skip to content

Commit

Permalink
fix: logcli: Check for errors before checking for exists when fetch…
Browse files Browse the repository at this point in the history
…ing data (#14780)

(cherry picked from commit 9e7d2f2)
  • Loading branch information
DylanGuedes authored and grafana-delivery-bot[bot] committed Nov 13, 2024
1 parent 540dd5a commit abc34c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/logcli/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,12 @@ func LoadSchemaUsingObjectClient(oc chunk.ObjectClient, name string) (*config.Sc
defer cancel()

ok, err := oc.ObjectExists(ctx, name)
if !ok {
return nil, errNotExists
}
if err != nil {
return nil, err
}
if !ok {
return nil, errNotExists
}

rdr, _, err := oc.GetObject(ctx, name)
if err != nil {
Expand Down

0 comments on commit abc34c6

Please sign in to comment.