You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/connector/apis/update-connector-error-api.asciidoc
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,11 @@ To get started with Connector APIs, check out the {enterprise-search-ref}/connec
21
21
* To sync data using self-managed connectors, you need to deploy the {enterprise-search-ref}/build-connector.html[Elastic connector service] on your own infrastructure. This service runs automatically on Elastic Cloud for native connectors.
22
22
* The `connector_id` parameter should reference an existing connector.
23
23
24
+
[[update-connector-error-api-desc]]
25
+
==== {api-description-title}
26
+
27
+
Sets the `error` field for the specified connector. If the `error` provided in the request body is non-null, the connector's status is updated to `error`. Otherwise, if the `error` is reset to null, the connector status is updated to `connected`.
Copy file name to clipboardExpand all lines: x-pack/plugin/ent-search/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/entsearch/connector/100_connector_update_error.yml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ setup:
29
29
connector_id: test-connector
30
30
31
31
- match: { error: "some error" }
32
+
- match: { status: error }
32
33
33
34
34
35
---
@@ -59,6 +60,7 @@ setup:
59
60
connector_id: test-connector
60
61
61
62
- match: { error: null }
63
+
- match: { status: connected }
62
64
63
65
---
64
66
"Update Connector Error - 404 when connector doesn't exist":
Copy file name to clipboardExpand all lines: x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/connector/ConnectorIndexService.java
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -467,21 +467,26 @@ else if (configurationValues != null) {
467
467
}
468
468
469
469
/**
470
-
* Updates the error property of a {@link Connector}.
470
+
* Updates the error property of a {@link Connector}. If error is non-null the resulting {@link ConnectorStatus}
471
+
* is 'error', otherwise it's 'connected'.
471
472
*
472
473
* @param connectorId The ID of the {@link Connector} to be updated.
473
474
* @param error An instance of error property of {@link Connector}, can be reset to [null].
474
475
* @param listener The listener for handling responses, including successful updates or errors.
Copy file name to clipboardExpand all lines: x-pack/plugin/ent-search/src/test/java/org/elasticsearch/xpack/application/connector/ConnectorIndexServiceTests.java
0 commit comments