API: Fix snapshot responses (#52998)
* API: Fix response status when snapshots are not found * API: Fix response status when snapshot key is empty * Apply suggestions from code review
This commit is contained in:
committed by
GitHub
parent
54217a2037
commit
5fec6cc4f5
@@ -91,7 +91,7 @@ func (d *DashboardSnapshotStore) GetDashboardSnapshot(ctx context.Context, query
|
||||
if err != nil {
|
||||
return err
|
||||
} else if !has {
|
||||
return dashboardsnapshots.ErrDashboardSnapshotNotFound
|
||||
return dashboardsnapshots.ErrBaseNotFound.Errorf("dashboard snapshot not found")
|
||||
}
|
||||
|
||||
query.Result = &snapshot
|
||||
|
||||
Reference in New Issue
Block a user