Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] [Security Solution][Endpoint] Mark code for refactor (#104278) #104292

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ describe('endpoint list middleware', () => {
});
});

describe('handle Endpoint Pending Actions state actions', () => {
describe.skip('handle Endpoint Pending Actions state actions', () => {
let mockedApis: ReturnType<typeof endpointPageHttpMock>;

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ export const endpointMiddlewareFactory: ImmutableMiddlewareFactory<EndpointState
});
}
} catch (error) {
// TODO should handle the error instead of logging it to the browser
// Also this is an anti-pattern we shouldn't use
// Ignore Errors, since this should not hinder the user's ability to use the UI
logError(error);
}
Expand Down Expand Up @@ -286,6 +288,8 @@ export const endpointMiddlewareFactory: ImmutableMiddlewareFactory<EndpointState
});
}
} catch (error) {
// TODO should handle the error instead of logging it to the browser
// Also this is an anti-pattern we shouldn't use
// Ignore Errors, since this should not hinder the user's ability to use the UI
logError(error);
}
Expand Down Expand Up @@ -331,6 +335,8 @@ export const endpointMiddlewareFactory: ImmutableMiddlewareFactory<EndpointState
});
}
} catch (error) {
// TODO should handle the error instead of logging it to the browser
// Also this is an anti-pattern we shouldn't use
// Ignore Errors, since this should not hinder the user's ability to use the UI
logError(error);
}
Expand Down Expand Up @@ -537,6 +543,8 @@ const endpointsTotal = async (http: HttpStart): Promise<number> => {
})
).total;
} catch (error) {
// TODO should handle the error instead of logging it to the browser
// Also this is an anti-pattern we shouldn't use
logError(`error while trying to check for total endpoints`);
logError(error);
}
Expand All @@ -547,6 +555,8 @@ const doEndpointsExist = async (http: HttpStart): Promise<boolean> => {
try {
return (await endpointsTotal(http)) > 0;
} catch (error) {
// TODO should handle the error instead of logging it to the browser
// Also this is an anti-pattern we shouldn't use
logError(`error while trying to check if endpoints exist`);
logError(error);
}
Expand Down Expand Up @@ -613,6 +623,8 @@ async function getEndpointPackageInfo(
payload: createLoadedResourceState(packageInfo),
});
} catch (error) {
// TODO should handle the error instead of logging it to the browser
// Also this is an anti-pattern we shouldn't use
// Ignore Errors, since this should not hinder the user's ability to use the UI
logError(error);
dispatch({
Expand Down Expand Up @@ -663,6 +675,8 @@ const loadEndpointsPendingActions = async ({
payload: createLoadedResourceState(agentIdToPendingActions),
});
} catch (error) {
// TODO should handle the error instead of logging it to the browser
// Also this is an anti-pattern we shouldn't use
logError(error);
}
};