Glue: Add configuration support to PATCH (#56117)
* feat: add config to tests v0 * feat: add config to UpdateCorrelationCommand * refactor: repair some tests * refactor: repair another test * refactor: repair last test * refactor: remove possible test * refactor: add comments * refactor: add changes from code review * refactor: implement more detailed patch * feat: add tests for partial config update * refactor: make error handling more detailed Co-authored-by: Giordano Ricci <me@giordanoricci.com> Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
co-authored by
Giordano Ricci
parent
680dfde90d
commit
bc9a37ee8d
@@ -160,7 +160,7 @@ func (s *CorrelationsService) updateHandler(c *models.ReqContext) response.Respo
|
||||
correlation, err := s.UpdateCorrelation(c.Req.Context(), cmd)
|
||||
if err != nil {
|
||||
if errors.Is(err, ErrUpdateCorrelationEmptyParams) {
|
||||
return response.Error(http.StatusBadRequest, "At least one of label, description is required", err)
|
||||
return response.Error(http.StatusBadRequest, "At least one of label, description or config is required", err)
|
||||
}
|
||||
|
||||
if errors.Is(err, ErrSourceDataSourceDoesNotExists) {
|
||||
|
||||
Reference in New Issue
Block a user