diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-06-24 18:36:08 +0200 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-06-24 20:11:49 +0200 |
commit | fa41db1dc35098a28e4ea9b47319cc8977327332 (patch) | |
tree | bbdd5885117d44679472fd9eda5035a9412dc1a7 /vespa-feed-client | |
parent | 3c123c3a50ad792a41411ca30edb6f10964622c5 (diff) |
Address reeview :)
Diffstat (limited to 'vespa-feed-client')
-rw-r--r-- | vespa-feed-client/src/main/java/ai/vespa/feed/client/ResultException.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/ResultException.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/ResultException.java new file mode 100644 index 00000000000..6b235e5e7ab --- /dev/null +++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/ResultException.java @@ -0,0 +1,25 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package ai.vespa.feed.client; + +import java.util.Optional; + +/** + * Signals that the document API in the feed container returned a failure result for a feed operation. + * + * @author jonmv + */ +public class ResultException extends FeedException { + + private final String trace; + + public ResultException(DocumentId documentId, String message, String trace) { + super(documentId, message); + this.trace = trace; + } + + /** Holds the trace, if the failed operation had a {@link OperationParameters#tracelevel(int)} higher than 0. */ + public Optional<String> getTrace() { + return Optional.ofNullable(trace); + } + +} |