Correlations: Return 200 instead of 404 for empt correlation lists (#55242)

* return 200 instead of 404 for empty correlations list

* handle empty list response & improve consistency
This commit is contained in:
Giordano Ricci
2022-09-20 11:13:33 +01:00
committed by GitHub
parent d014a3a09b
commit d815e2cb56
8 changed files with 82 additions and 112 deletions
-8
View File
@@ -192,10 +192,6 @@ func (s CorrelationsService) getCorrelationsBySourceUID(ctx context.Context, cmd
return []Correlation{}, err
}
if len(correlations) == 0 {
return []Correlation{}, ErrCorrelationNotFound
}
return correlations, nil
}
@@ -209,10 +205,6 @@ func (s CorrelationsService) getCorrelations(ctx context.Context, cmd GetCorrela
return []Correlation{}, err
}
if len(correlations) == 0 {
return []Correlation{}, ErrCorrelationNotFound
}
return correlations, nil
}