mirror of
https://github.com/grafana/grafana.git
synced 2025-01-08 15:13:30 -06:00
always return after errors.
This commit is contained in:
parent
0688050552
commit
76e9ebde36
@ -91,6 +91,7 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) {
|
||||
limitReached, err := m.QuotaReached(cmd.OrgId, m.QUOTA_DASHBOARD)
|
||||
if err != nil {
|
||||
c.JsonApiErr(500, "failed to get quota", err)
|
||||
return
|
||||
}
|
||||
if limitReached {
|
||||
c.JsonApiErr(403, "Quota reached", nil)
|
||||
|
@ -259,6 +259,7 @@ func LimitQuota(target m.QuotaTarget) macaron.Handler {
|
||||
limitReached, err := m.QuotaReached(c.OrgId, target)
|
||||
if err != nil {
|
||||
c.JsonApiErr(500, "failed to get quota", err)
|
||||
return
|
||||
}
|
||||
if limitReached {
|
||||
c.JsonApiErr(403, "Quota reached", nil)
|
||||
|
Loading…
Reference in New Issue
Block a user