-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#111951) * [Security Solution] Detect and fix corrupt artifacts (#111853) * Recover from artifact not found errors in `getLastComputedManifest()` + some changes to logger calls * Recover from errors while retrieving the internal artifact map * Use `EndpointError` in ManifestManager and capture more metadata around error * Convert some logger.debug calls to logger.error + use EndpointError # Conflicts: # x-pack/plugins/security_solution/server/endpoint/utils/wrap_errors.ts * fix missing export
- Loading branch information
1 parent
28bb104
commit f33859c
Showing
10 changed files
with
217 additions
and
26 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
x-pack/plugins/security_solution/server/endpoint/errors.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
/* eslint-disable max-classes-per-file */ | ||
|
||
export class EndpointError extends Error { | ||
constructor(message: string, public readonly meta?: unknown) { | ||
super(message); | ||
// For debugging - capture name of subclasses | ||
this.name = this.constructor.name; | ||
} | ||
} | ||
|
||
export class NotFoundError extends EndpointError {} | ||
|
||
export class EndpointAppContentServicesNotStartedError extends EndpointError { | ||
constructor() { | ||
super('EndpointAppContextService has not been started (EndpointAppContextService.start())'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
x-pack/plugins/security_solution/server/endpoint/services/artifacts/errors.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EndpointError } from '../../errors'; | ||
|
||
/** | ||
* Indicates that the internal manifest that is managed by ManifestManager is invalid or contains | ||
* invalid data | ||
*/ | ||
export class InvalidInternalManifestError extends EndpointError {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
*/ | ||
|
||
export * from './fleet_agent_status_to_endpoint_host_status'; | ||
export * from './wrap_errors'; |
Oops, something went wrong.