[file_upload] include caused_by field for import failures (#107907)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Nathan Reese 2021-08-10 09:53:50 -06:00 committed by GitHub
parent 1649661ffd
commit 37a97b435e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -111,6 +111,10 @@ export interface ImportResponse {
export interface ImportFailure {
item: number;
reason: string;
caused_by?: {
type: string;
reason: string;
};
doc: ImportDoc;
}

View file

@ -164,6 +164,7 @@ export function importDataProvider({ asCurrentUser }: IScopedClusterClient) {
failures.push({
item: i,
reason: item.index.error.reason,
caused_by: item.index.error.caused_by,
doc: data[i],
});
}