summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java2
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java14
2 files changed, 8 insertions, 8 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java
index 135b6a824c8..a4a36026fc5 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutorImpl.java
@@ -221,7 +221,7 @@ public class DocumentOperationExecutorImpl implements DocumentOperationExecutor
catch (IllegalArgumentException | ParseException e) {
context.error(BAD_REQUEST, Exceptions.toMessageString(e));
}
- catch (RuntimeException e) {
+ catch (RuntimeException | LinkageError e) {
context.error(ERROR, Exceptions.toMessageString(e));
}
}
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
index 98bbb029ea8..bb1dd8f20c4 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
@@ -166,7 +166,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
catch (IllegalArgumentException e) {
return badRequest(request, e, responseHandler);
}
- catch (RuntimeException e) {
+ catch (RuntimeException | LinkageError e) {
return serverError(request, e, responseHandler);
}
}
@@ -250,7 +250,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
}
}
// TODO jonmv: This shouldn't happen much, but ... expose errors too?
- catch (RuntimeException e) {
+ catch (RuntimeException | LinkageError e) {
log.log(WARNING, "Exception serializing document in document/v1 visit response", e);
}
});
@@ -296,7 +296,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
catch (IllegalArgumentException e) {
badRequest(request, e, handler);
}
- catch (RuntimeException e) {
+ catch (RuntimeException | LinkageError e) {
serverError(request, e, handler);
}
});
@@ -318,7 +318,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
catch (IllegalArgumentException e) {
badRequest(request, e, handler);
}
- catch (RuntimeException e) {
+ catch (RuntimeException | LinkageError e) {
serverError(request, e, handler);
}
});
@@ -423,10 +423,10 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
return respond(Response.Status.TOO_MANY_REQUESTS, root, handler);
}
- private static ContentChannel serverError(HttpRequest request, RuntimeException e, ResponseHandler handler) {
- log.log(WARNING, "Uncaught exception handling request " + request.getMethod() + " " + request.getUri().getRawPath() + ":", e);
+ private static ContentChannel serverError(HttpRequest request, Throwable t, ResponseHandler handler) {
+ log.log(WARNING, "Uncaught exception handling request " + request.getMethod() + " " + request.getUri().getRawPath() + ":", t);
Cursor root = responseRoot(request);
- root.setString("message", Exceptions.toMessageString(e));
+ root.setString("message", Exceptions.toMessageString(t));
return respond(Response.Status.INTERNAL_SERVER_ERROR, root, handler);
}