mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Fleet] EPM - Fix error message for data stream settings update (#210330)
## Summary During package installation, failure to update the default pipeline for data streams currently has a misleading error message. This PR corrects this and adds the original error message to improve clarity. ### Identify risks N/A --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
d26f9ffbb6
commit
2f4fb3ff2f
1 changed files with 5 additions and 2 deletions
|
@ -1212,7 +1212,7 @@ const updateExistingDataStream = async ({
|
|||
}
|
||||
|
||||
try {
|
||||
logger.debug(`Updating settings for ${dataStreamName}`);
|
||||
logger.debug(`Updating index settings of data stream ${dataStreamName}`);
|
||||
|
||||
await retryTransientEsErrors(
|
||||
() =>
|
||||
|
@ -1223,8 +1223,11 @@ const updateExistingDataStream = async ({
|
|||
{ logger }
|
||||
);
|
||||
} catch (err) {
|
||||
logger.error(`Error updating index settings of data stream ${dataStreamName}: ${err}`);
|
||||
// Same as above - Check if this error can happen because of invalid settings;
|
||||
// We are returning a 500 but in that case it should be a 400 instead
|
||||
throw new PackageESError(`Could not update index template settings for ${dataStreamName}`);
|
||||
throw new PackageESError(
|
||||
`Could not update index settings of data stream ${dataStreamName}: ${err.message}`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue