mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 09:33:34 -06:00
API: Return 409 on datasource version conflict (#32425)
Signed-off-by: bergquist <carl.bergquist@gmail.com> Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
parent
e1458391bb
commit
5ec530f3fc
@ -240,7 +240,7 @@ func UpdateDataSource(c *models.ReqContext, cmd models.UpdateDataSourceCommand)
|
||||
err = bus.Dispatch(&cmd)
|
||||
if err != nil {
|
||||
if errors.Is(err, models.ErrDataSourceUpdatingOldVersion) {
|
||||
return response.Error(500, "Failed to update datasource. Reload new version and try again", err)
|
||||
return response.Error(409, "Datasource has already been updated by someone else. Please reload and try again", err)
|
||||
}
|
||||
return response.Error(500, "Failed to update datasource", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user