This is an automated email from the ASF dual-hosted git repository.
cegerton 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 31ff6d7f8a MINOR: Stop logging 404s at ERROR level in Connect
31ff6d7f8a is described below
commit 31ff6d7f8af57e8c39061f31774a61bd1728904e
Author: nicolasguyomar <[email protected]>
AuthorDate: Mon Aug 1 14:48:35 2022 +0200
MINOR: Stop logging 404s at ERROR level in Connect
Catches valid 404 exceptions, triggered by any HTTP request to a
nonexistent path on the Connect REST API, higher in the code to not to log an
ERROR log which can be seen as a false alarm
Reviewers: Chris Egerton <[email protected]>
---
.../kafka/connect/runtime/rest/errors/ConnectExceptionMapper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/errors/ConnectExceptionMapper.java
b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/errors/ConnectExceptionMapper.java
index 8678fbf16c..2bb90e2147 100644
---
a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/errors/ConnectExceptionMapper.java
+++
b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/errors/ConnectExceptionMapper.java
@@ -45,7 +45,7 @@ public class ConnectExceptionMapper implements
ExceptionMapper<Exception> {
.build();
}
- if (exception instanceof NotFoundException) {
+ if (exception instanceof NotFoundException || exception instanceof
javax.ws.rs.NotFoundException) {
return Response.status(Response.Status.NOT_FOUND)
.entity(new
ErrorMessage(Response.Status.NOT_FOUND.getStatusCode(), exception.getMessage()))
.build();