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

Sharing saved-objects phase 1 #54605

Merged
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
16ec12f
POC
jportner Jan 13, 2020
f7642f4
Fix broken unit tests, add new ones
jportner Jan 29, 2020
17718c4
Use SavedObjectsErrorHelpers for `bulkGet` operation "Not found"
jportner Feb 14, 2020
9465303
Do not allow non-array references in `create` operations
jportner Feb 13, 2020
daf685e
Refactor CheckPrivileges unit tests
jportner Feb 12, 2020
d49e1bd
Support multi-namespace operations
jportner Feb 12, 2020
9736f8b
Simplify CheckSavedObjectsPrivileges
jportner Feb 20, 2020
5fe2720
Rewrite getQueryParams unit tests
jportner Feb 26, 2020
ffd49e5
Update getQueryParams and update unit tests
jportner Feb 26, 2020
5a3fe41
Support encrypted saved objects
jportner Feb 26, 2020
f7d5b81
Improve Repository.bulkGet behavior
jportner Mar 6, 2020
4bd2d00
Fix saved_object_api_integration tests
jportner Mar 10, 2020
a1944f4
Rename methods for checking saved object types
jportner Mar 10, 2020
7b66aa3
node scripts/check_published_api_changes.js --accept
jportner Mar 10, 2020
b0bba09
Fix api_integration tests
jportner Mar 11, 2020
84d8e42
Misc cleanup
jportner Mar 13, 2020
da8417b
Change behavior of addNamespaces API for Saved Objects Client
jportner Mar 15, 2020
4a0f757
Add/update spaces_api_integration tests
jportner Mar 15, 2020
4f06602
Merge branch 'master' into pr/jportner/54605
jportner Mar 15, 2020
720acb0
Address first round of PR review feedback
jportner Mar 17, 2020
3a32b9a
Clean up SpacesSavedObjectsClient unit tests
jportner Mar 18, 2020
1508946
Remove validation callback from `addNamespaces` operation
jportner Mar 18, 2020
70a1ef7
Merge branch 'master' into pr/jportner/54605
jportner Mar 19, 2020
a5070cf
Change `SavedObjectType` to use `namespaceType`
jportner Mar 19, 2020
9f9effb
Fail gracefully when Elasticsearch query cannot execute a script
jportner Mar 20, 2020
7d70162
Merge branch 'master' into pr/jportner/54605
jportner Mar 23, 2020
e60724d
Fix type check failure
jportner Mar 23, 2020
4f12e46
Address second round of PR review feedback
jportner Mar 25, 2020
f2980c7
Fix outdated unit test snapshots
jportner Mar 25, 2020
cd8791a
Merge branch 'master' into pr/jportner/54605
jportner Mar 26, 2020
92e5ccd
Address third round of PR review feedback
jportner Mar 26, 2020
a5e1424
Simplify `addNamespaces` authZ checks
jportner Mar 26, 2020
dee4a94
Remove custom Not Found errors
jportner Mar 26, 2020
b26aa40
Merge branch 'master' into pr/jportner/54605
jportner Mar 31, 2020
fa5f361
Loosen validation for `addNamespaces` and `removeNamespaces`
jportner Mar 31, 2020
8bf57aa
Fix type check error
jportner Apr 1, 2020
4d75956
Address fourth round of PR review feedback
jportner Apr 1, 2020
83d846e
Fix typo in comment
jportner Apr 1, 2020
57df368
Merge branch 'master' into issue-54043-sharing-saved-objects-phase-1
elasticmachine Apr 2, 2020
28b3b1e
Merge branch 'master' into pr/jportner/54605
jportner Apr 6, 2020
a832503
Refactor SavedObjectsRepository discriminated unions
jportner Apr 6, 2020
94d31ec
Clean up preflight checks for bulk operations
jportner Apr 6, 2020
418f1cd
Renamed `addNamespaces` and `removeNamespaces` methods
jportner Apr 6, 2020
e2f5d65
Address remaining items from fifth round of PR review feedback
jportner Apr 6, 2020
c0dd3b0
Fix integration test file names in test suites
jportner Apr 6, 2020
65fac79
Merge branch 'master' into pr/jportner/54605
jportner Apr 7, 2020
ec7fc3e
Address sixth round of PR review feedback
jportner Apr 7, 2020
dbce4e8
WIP
jportner Apr 7, 2020
e3a5416
Address nits on integration tests
jportner Apr 7, 2020
7a8c11b
Merge branch 'master' into pr/jportner/54605
jportner Apr 8, 2020
223ecef
Fix more nits
jportner Apr 8, 2020
c26a49d
Merge branch 'master' into issue-54043-sharing-saved-objects-phase-1
elasticmachine Apr 8, 2020
d24fa35
Merge branch 'master' into pr/jportner/54605
jportner Apr 9, 2020
c4c35c1
Merge branch 'master' into issue-54043-sharing-saved-objects-phase-1
elasticmachine Apr 10, 2020
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
2 changes: 1 addition & 1 deletion docs/api/saved-objects/bulk_create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The API returns the following:
"type": "dashboard",
"error": {
"statusCode": 409,
"message": "version conflict, document already exists"
"message": "Saved object [dashboard/be3733a0-9efe-11e7-acb3-3dab96693fab] conflict"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface SavedObject<T = unknown>
| [error](./kibana-plugin-core-public.savedobject.error.md) | <code>{</code><br/><code> message: string;</code><br/><code> statusCode: number;</code><br/><code> }</code> | |
| [id](./kibana-plugin-core-public.savedobject.id.md) | <code>string</code> | The ID of this Saved Object, guaranteed to be unique for all objects of the same <code>type</code> |
| [migrationVersion](./kibana-plugin-core-public.savedobject.migrationversion.md) | <code>SavedObjectsMigrationVersion</code> | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
| [namespaces](./kibana-plugin-core-public.savedobject.namespaces.md) | <code>string[]</code> | Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types. |
| [references](./kibana-plugin-core-public.savedobject.references.md) | <code>SavedObjectReference[]</code> | A reference to another saved object. |
| [type](./kibana-plugin-core-public.savedobject.type.md) | <code>string</code> | The type of Saved Object. Each plugin can define it's own custom Saved Object types. |
| [updated\_at](./kibana-plugin-core-public.savedobject.updated_at.md) | <code>string</code> | Timestamp of the last time this document had been updated. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObject](./kibana-plugin-core-public.savedobject.md) &gt; [namespaces](./kibana-plugin-core-public.savedobject.namespaces.md)

## SavedObject.namespaces property

Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types.

<b>Signature:</b>

```typescript
namespaces?: string[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ See [SavedObjectTypeRegistry](./kibana-plugin-core-server.savedobjecttyperegistr
<b>Signature:</b>

```typescript
export declare type ISavedObjectTypeRegistry = Pick<SavedObjectTypeRegistry, 'getType' | 'getAllTypes' | 'getIndex' | 'isNamespaceAgnostic' | 'isHidden' | 'getImportableAndExportableTypes' | 'isImportableAndExportable'>;
export declare type ISavedObjectTypeRegistry = Omit<SavedObjectTypeRegistry, 'registerType'>;
```
3 changes: 3 additions & 0 deletions docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectMigrationContext](./kibana-plugin-core-server.savedobjectmigrationcontext.md) | Migration context provided when invoking a [migration handler](./kibana-plugin-core-server.savedobjectmigrationfn.md) |
| [SavedObjectMigrationMap](./kibana-plugin-core-server.savedobjectmigrationmap.md) | A map of [migration functions](./kibana-plugin-core-server.savedobjectmigrationfn.md) to be used for a given type. The map's keys must be valid semver versions.<!-- -->For a given document, only migrations with a higher version number than that of the document will be applied. Migrations are executed in order, starting from the lowest version and ending with the highest one. |
| [SavedObjectReference](./kibana-plugin-core-server.savedobjectreference.md) | A reference to another saved object. |
| [SavedObjectsAddToNamespacesOptions](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.md) | |
| [SavedObjectsBaseOptions](./kibana-plugin-core-server.savedobjectsbaseoptions.md) | |
| [SavedObjectsBulkCreateObject](./kibana-plugin-core-server.savedobjectsbulkcreateobject.md) | |
| [SavedObjectsBulkGetObject](./kibana-plugin-core-server.savedobjectsbulkgetobject.md) | |
Expand All @@ -140,6 +141,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. |
| [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) | |
| [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md) | |
| [SavedObjectsDeleteFromNamespacesOptions](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesoptions.md) | |
| [SavedObjectsDeleteOptions](./kibana-plugin-core-server.savedobjectsdeleteoptions.md) | |
| [SavedObjectsExportOptions](./kibana-plugin-core-server.savedobjectsexportoptions.md) | Options controlling the export operation. |
| [SavedObjectsExportResultDetails](./kibana-plugin-core-server.savedobjectsexportresultdetails.md) | Structure of the export result details entry |
Expand Down Expand Up @@ -255,6 +257,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsClientFactoryProvider](./kibana-plugin-core-server.savedobjectsclientfactoryprovider.md) | Provider to invoke to retrieve a [SavedObjectsClientFactory](./kibana-plugin-core-server.savedobjectsclientfactory.md)<!-- -->. |
| [SavedObjectsClientWrapperFactory](./kibana-plugin-core-server.savedobjectsclientwrapperfactory.md) | Describes the factory used to create instances of Saved Objects Client Wrappers. |
| [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) | Describe a [saved object type mapping](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) field.<!-- -->Please refer to [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html) For the mapping documentation |
| [SavedObjectsNamespaceType](./kibana-plugin-core-server.savedobjectsnamespacetype.md) | The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: \* single (default): this type of saved object is namespace-isolated, e.g., it exists in only one namespace. \* multiple: this type of saved object is shareable, e.g., it can exist in one or more namespaces. \* agnostic: this type of saved object is global.<!-- -->Note: do not write logic that uses this value directly; instead, use the appropriate accessors in the [type registry](./kibana-plugin-core-server.savedobjecttyperegistry.md)<!-- -->. |
| [ScopeableRequest](./kibana-plugin-core-server.scopeablerequest.md) | A user credentials container. It accommodates the necessary auth credentials to impersonate the current user.<!-- -->See [KibanaRequest](./kibana-plugin-core-server.kibanarequest.md)<!-- -->. |
| [SharedGlobalConfig](./kibana-plugin-core-server.sharedglobalconfig.md) | |
| [StartServicesAccessor](./kibana-plugin-core-server.startservicesaccessor.md) | Allows plugins to get access to APIs available in start inside async handlers. Promise will not resolve until Core and plugin dependencies have completed <code>start</code>. This should only be used inside handlers registered during <code>setup</code> that will only be executed after <code>start</code> lifecycle. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface SavedObject<T = unknown>
| [error](./kibana-plugin-core-server.savedobject.error.md) | <code>{</code><br/><code> message: string;</code><br/><code> statusCode: number;</code><br/><code> }</code> | |
| [id](./kibana-plugin-core-server.savedobject.id.md) | <code>string</code> | The ID of this Saved Object, guaranteed to be unique for all objects of the same <code>type</code> |
| [migrationVersion](./kibana-plugin-core-server.savedobject.migrationversion.md) | <code>SavedObjectsMigrationVersion</code> | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
| [namespaces](./kibana-plugin-core-server.savedobject.namespaces.md) | <code>string[]</code> | Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types. |
| [references](./kibana-plugin-core-server.savedobject.references.md) | <code>SavedObjectReference[]</code> | A reference to another saved object. |
| [type](./kibana-plugin-core-server.savedobject.type.md) | <code>string</code> | The type of Saved Object. Each plugin can define it's own custom Saved Object types. |
| [updated\_at](./kibana-plugin-core-server.savedobject.updated_at.md) | <code>string</code> | Timestamp of the last time this document had been updated. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObject](./kibana-plugin-core-server.savedobject.md) &gt; [namespaces](./kibana-plugin-core-server.savedobject.namespaces.md)

## SavedObject.namespaces property

Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types.

<b>Signature:</b>

```typescript
namespaces?: string[];
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsAddToNamespacesOptions](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.md)

## SavedObjectsAddToNamespacesOptions interface


<b>Signature:</b>

```typescript
export interface SavedObjectsAddToNamespacesOptions extends SavedObjectsBaseOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [refresh](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.refresh.md) | <code>MutatingOperationRefreshSetting</code> | The Elasticsearch Refresh setting for this operation |
| [version](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.version.md) | <code>string</code> | An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsAddToNamespacesOptions](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.md) &gt; [refresh](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.refresh.md)

## SavedObjectsAddToNamespacesOptions.refresh property

The Elasticsearch Refresh setting for this operation

<b>Signature:</b>

```typescript
refresh?: MutatingOperationRefreshSetting;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsAddToNamespacesOptions](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.md) &gt; [version](./kibana-plugin-core-server.savedobjectsaddtonamespacesoptions.version.md)

## SavedObjectsAddToNamespacesOptions.version property

An opaque version number which changes on each successful write operation. Can be used for implementing optimistic concurrency control.

<b>Signature:</b>

```typescript
version?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsClient](./kibana-plugin-core-server.savedobjectsclient.md) &gt; [addToNamespaces](./kibana-plugin-core-server.savedobjectsclient.addtonamespaces.md)

## SavedObjectsClient.addToNamespaces() method

Adds namespaces to a SavedObject

<b>Signature:</b>

```typescript
addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise<{}>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| type | <code>string</code> | |
| id | <code>string</code> | |
| namespaces | <code>string[]</code> | |
| options | <code>SavedObjectsAddToNamespacesOptions</code> | |

<b>Returns:</b>

`Promise<{}>`

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsClient](./kibana-plugin-core-server.savedobjectsclient.md) &gt; [deleteFromNamespaces](./kibana-plugin-core-server.savedobjectsclient.deletefromnamespaces.md)

## SavedObjectsClient.deleteFromNamespaces() method

Removes namespaces from a SavedObject

<b>Signature:</b>

```typescript
deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise<{}>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| type | <code>string</code> | |
| id | <code>string</code> | |
| namespaces | <code>string[]</code> | |
| options | <code>SavedObjectsDeleteFromNamespacesOptions</code> | |

<b>Returns:</b>

`Promise<{}>`

Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ The constructor for this class is marked as internal. Third-party code should no

| Method | Modifiers | Description |
| --- | --- | --- |
| [addToNamespaces(type, id, namespaces, options)](./kibana-plugin-core-server.savedobjectsclient.addtonamespaces.md) | | Adds namespaces to a SavedObject |
| [bulkCreate(objects, options)](./kibana-plugin-core-server.savedobjectsclient.bulkcreate.md) | | Persists multiple documents batched together as a single request |
| [bulkGet(objects, options)](./kibana-plugin-core-server.savedobjectsclient.bulkget.md) | | Returns an array of objects by id |
| [bulkUpdate(objects, options)](./kibana-plugin-core-server.savedobjectsclient.bulkupdate.md) | | Bulk Updates multiple SavedObject at once |
| [create(type, attributes, options)](./kibana-plugin-core-server.savedobjectsclient.create.md) | | Persists a SavedObject |
| [delete(type, id, options)](./kibana-plugin-core-server.savedobjectsclient.delete.md) | | Deletes a SavedObject |
| [deleteFromNamespaces(type, id, namespaces, options)](./kibana-plugin-core-server.savedobjectsclient.deletefromnamespaces.md) | | Removes namespaces from a SavedObject |
| [find(options)](./kibana-plugin-core-server.savedobjectsclient.find.md) | | Find all SavedObjects matching the search query |
| [get(type, id, options)](./kibana-plugin-core-server.savedobjectsclient.get.md) | | Retrieves a single object |
| [update(type, id, attributes, options)](./kibana-plugin-core-server.savedobjectsclient.update.md) | | Updates an SavedObject |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsDeleteFromNamespacesOptions](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesoptions.md)

## SavedObjectsDeleteFromNamespacesOptions interface


<b>Signature:</b>

```typescript
export interface SavedObjectsDeleteFromNamespacesOptions extends SavedObjectsBaseOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [refresh](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesoptions.refresh.md) | <code>MutatingOperationRefreshSetting</code> | The Elasticsearch Refresh setting for this operation |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsDeleteFromNamespacesOptions](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesoptions.md) &gt; [refresh](./kibana-plugin-core-server.savedobjectsdeletefromnamespacesoptions.refresh.md)

## SavedObjectsDeleteFromNamespacesOptions.refresh property

The Elasticsearch Refresh setting for this operation

<b>Signature:</b>

```typescript
refresh?: MutatingOperationRefreshSetting;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md) &gt; [createConflictError](./kibana-plugin-core-server.savedobjectserrorhelpers.createconflicterror.md)

## SavedObjectsErrorHelpers.createConflictError() method

<b>Signature:</b>

```typescript
static createConflictError(type: string, id: string): DecoratedError;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| type | <code>string</code> | |
| id | <code>string</code> | |

<b>Returns:</b>

`DecoratedError`

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md) &gt; [decorateEsCannotExecuteScriptError](./kibana-plugin-core-server.savedobjectserrorhelpers.decorateescannotexecutescripterror.md)

## SavedObjectsErrorHelpers.decorateEsCannotExecuteScriptError() method

<b>Signature:</b>

```typescript
static decorateEsCannotExecuteScriptError(error: Error, reason?: string): DecoratedError;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| error | <code>Error</code> | |
| reason | <code>string</code> | |

<b>Returns:</b>

`DecoratedError`

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md) &gt; [isEsCannotExecuteScriptError](./kibana-plugin-core-server.savedobjectserrorhelpers.isescannotexecutescripterror.md)

## SavedObjectsErrorHelpers.isEsCannotExecuteScriptError() method

<b>Signature:</b>

```typescript
static isEsCannotExecuteScriptError(error: Error | DecoratedError): boolean;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| error | <code>Error &#124; DecoratedError</code> | |

<b>Returns:</b>

`boolean`

Loading