Skip to content

Commit 0bd3f66

Browse files
committed
Don't generate stacktrace in TaskCancelledException
1 parent dc013bb commit 0bd3f66

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/src/main/java/org/elasticsearch/tasks/TaskCancelledException.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ public TaskCancelledException(StreamInput in) throws IOException {
2727
super(in);
2828
}
2929

30+
@Override
31+
public Throwable fillInStackTrace() {
32+
return this; // this exception doesn't imply a bug, no need for a stack trace
33+
}
34+
3035
@Override
3136
public RestStatus status() {
3237
// Tasks are typically cancelled at the request of the client, so a 4xx status code is more accurate than the default of 500 (and

0 commit comments

Comments
 (0)