mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 02:10:45 -06:00
GCM: Fix error checking for GCE project getter (#95613)
Appropriately check error
This commit is contained in:
parent
fe4f44723d
commit
08e880a823
@ -591,7 +591,10 @@ func (s *Service) ensureProject(ctx context.Context, dsInfo datasourceInfo, proj
|
||||
func (s *Service) getDefaultProject(ctx context.Context, dsInfo datasourceInfo) (string, error) {
|
||||
if dsInfo.authenticationType == gceAuthentication {
|
||||
project, err := s.gceDefaultProjectGetter(ctx, cloudMonitorScope)
|
||||
return project, errorsource.DownstreamError(err, false)
|
||||
if err != nil {
|
||||
return project, errorsource.DownstreamError(err, false)
|
||||
}
|
||||
return project, nil
|
||||
}
|
||||
return dsInfo.defaultProject, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user