Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions internal/kibana/savedobjects.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ func (c *Client) SetManagedSavedObject(ctx context.Context, savedObjectType stri

// Even if no error is returned, we need to check if the import was successful.
if !resp.Success {
if len(resp.Errors) > 0 {
var errorMessages []string
for _, importError := range resp.Errors {
errorMessages = append(errorMessages, fmt.Sprintf("ID: %s, Type: %s, Error: %v", importError.ID, importError.Type, importError.Error))
}
return fmt.Errorf("failed to import one or more saved objects: %s", strings.Join(errorMessages, "; "))
}
return fmt.Errorf("importing %s %s was not successful", savedObjectType, id)
}

Expand Down