mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Encryption: Re-order error check (#52251)
This commit is contained in:
parent
41790083d2
commit
973b3112d7
@ -38,14 +38,14 @@ func (ss *SecretsStoreImpl) GetDataKey(ctx context.Context, id string) (*secrets
|
||||
return err
|
||||
})
|
||||
|
||||
if !exists {
|
||||
return nil, secrets.ErrDataKeyNotFound
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed getting data key: %w", err)
|
||||
}
|
||||
|
||||
if !exists {
|
||||
return nil, secrets.ErrDataKeyNotFound
|
||||
}
|
||||
|
||||
return dataKey, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user