* return 400 bad request if id and orgId is invalid
Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit eb241b960f)
Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
This commit is contained in:
co-authored by
Carl Bergquist
parent
4dffb875cf
commit
42d465e38a
@@ -72,6 +72,9 @@ func GetDataSourceById(c *models.ReqContext) response.Response {
|
||||
if errors.Is(err, models.ErrDataSourceNotFound) {
|
||||
return response.Error(404, "Data source not found", nil)
|
||||
}
|
||||
if errors.Is(err, models.ErrDataSourceIdentifierNotSet) {
|
||||
return response.Error(400, "Datasource id is missing", nil)
|
||||
}
|
||||
return response.Error(500, "Failed to query datasources", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user