Skip to content

Commit

Permalink
[Entity Analytics][Entity Store] Clear error on second entity engine …
Browse files Browse the repository at this point in the history
…init API call (elastic#202903)

## Summary

If the first call to init an entity engine fails, we add the `error`
property to the engine status, if we then call the API a second time
this error was not being wiped. This PR resets the error on the second
call.

### Test steps

- Do not visit the UI of a kibana so that the security default data view
does not exist
- Call the init API for an entity engine e,g host
- Call the engine status API, notice the status has an error
- Visait the security solution UI and wait for the data view to be
created
- Re-call the init API and notice the error has gone
  • Loading branch information
hop-dev authored and SoniaSanzV committed Dec 9, 2024
1 parent aac82ef commit 36c70a6
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class EngineDescriptorClient {
const old = engineDescriptor.saved_objects[0].attributes;
const update = {
...old,
error: undefined, // if the engine is being re-initialized, clear any previous error
status: ENGINE_STATUS.INSTALLING,
filter,
fieldHistoryLength,
Expand Down

0 comments on commit 36c70a6

Please sign in to comment.