Skip to content

Commit 9e7d2f2

Browse files
authored
fix: logcli: Check for errors before checking for exists when fetching data (#14780)
1 parent ad9bdcd commit 9e7d2f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎pkg/logcli/query/query.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -553,12 +553,12 @@ func LoadSchemaUsingObjectClient(oc chunk.ObjectClient, name string) (*config.Sc
553553
defer cancel()
554554

555555
ok, err := oc.ObjectExists(ctx, name)
556-
if !ok {
557-
return nil, errNotExists
558-
}
559556
if err != nil {
560557
return nil, err
561558
}
559+
if !ok {
560+
return nil, errNotExists
561+
}
562562

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

0 commit comments

Comments
 (0)