mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
Encryption: Re-order error check (#52251)
This commit is contained in:
@@ -38,14 +38,14 @@ func (ss *SecretsStoreImpl) GetDataKey(ctx context.Context, id string) (*secrets
|
|||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
|
||||||
if !exists {
|
|
||||||
return nil, secrets.ErrDataKeyNotFound
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed getting data key: %w", err)
|
return nil, fmt.Errorf("failed getting data key: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !exists {
|
||||||
|
return nil, secrets.ErrDataKeyNotFound
|
||||||
|
}
|
||||||
|
|
||||||
return dataKey, nil
|
return dataKey, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user