mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
When we get a 403 trying to get the telemetry document, assume we (#23631)
haven't opted into telemetry
This commit is contained in:
parent
3d50ef741a
commit
a839f7f403
1 changed files with 7 additions and 0 deletions
|
@ -21,6 +21,13 @@ export async function getTelemetryOptIn(request) {
|
|||
if (savedObjectsClient.errors.isNotFoundError(error)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// if we aren't allowed to get the telemetry document, we can assume that we won't
|
||||
// be able to opt into telemetry either, so we're returning `false` here instead of null
|
||||
if (savedObjectsClient.errors.isForbiddenError(error)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue