You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by kk...@apache.org on 2020/03/22 19:43:15 UTC
[kafka] branch trunk updated: MINOR: Update Connect error message
to point to the correct config validation REST endpoint (#7991)
This is an automated email from the ASF dual-hosted git repository.
kkarantasis pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new f8173c2 MINOR: Update Connect error message to point to the correct config validation REST endpoint (#7991)
f8173c2 is described below
commit f8173c2df573ae9b53ab7ea6e5d6700acf8e0cf4
Author: nicolasguyomar <ni...@gmail.com>
AuthorDate: Sun Mar 22 20:42:45 2020 +0100
MINOR: Update Connect error message to point to the correct config validation REST endpoint (#7991)
When incorrect connector configuration is detected, the returned exception message suggests to check the connector's configuration against the `{connectorType}/config/validate` endpoint.
Changing the error message to refer to the exact REST endpoint which is `/connector-plugins/{connectorType}/config/validate`
This aligns the exception message with the documentation at: https://kafka.apache.org/documentation/#connect_rest
Reviewers: Konstantine Karantasis <ko...@confluent.io>
---
.../src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java | 2 +-
.../apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java
index f0315b6..8d8934b 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java
@@ -577,7 +577,7 @@ public abstract class AbstractHerder implements Herder, TaskStatus.Listener, Con
callback.onCompletion(
new BadRequestException(
messages.append(
- "\nYou can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"
+ "\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
).toString()
), null
);
diff --git a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java
index 3018677..89d4e45 100644
--- a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java
+++ b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java
@@ -617,7 +617,7 @@ public class StandaloneHerderTest {
capture.getValue().getMessage(),
"Connector configuration is invalid and contains the following 1 error(s):\n" +
error + "\n" +
- "You can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"
+ "You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
);
PowerMock.verifyAll();