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 20:24:12 UTC
[kafka] 01/02: 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 2.3
in repository https://gitbox.apache.org/repos/asf/kafka.git
commit 9d643cde3604e2a863bb3922398efc0cab716d6b
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 83d81bb..9a6553d 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
@@ -556,7 +556,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 e020cee..f8a75bd 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
@@ -614,7 +614,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();