mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
bug: return correct err message
if the sql query failed has is false and the method will return m.ErrDataSourceNotFound which is incorrect. We now return the correct error message from the query ref #10843
This commit is contained in:
parent
dba087463a
commit
1a041a2250
@ -27,6 +27,9 @@ func GetDataSourceById(query *m.GetDataSourceByIdQuery) error {
|
||||
|
||||
datasource := m.DataSource{OrgId: query.OrgId, Id: query.Id}
|
||||
has, err := x.Get(&datasource)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !has {
|
||||
return m.ErrDataSourceNotFound
|
||||
|
Loading…
Reference in New Issue
Block a user