File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
kafka-connect-rest-source/src/main/java/org/radarbase/connect/rest Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2626import java .util .List ;
2727import java .util .Map ;
2828import java .util .stream .Collectors ;
29+ import javax .ws .rs .NotAuthorizedException ;
2930import org .apache .kafka .connect .errors .ConnectException ;
3031import org .apache .kafka .connect .source .SourceRecord ;
3132import org .apache .kafka .connect .source .SourceTask ;
@@ -86,7 +87,7 @@ public List<SourceRecord> poll() throws InterruptedException {
8687 try {
8788 requests = request .handleRequest ()
8889 .collect (Collectors .toList ());
89- } catch (IOException ex ) {
90+ } catch (IOException | NotAuthorizedException ex ) {
9091 logger .warn ("Failed to make request: {}" , ex .toString ());
9192 }
9293 }
Original file line number Diff line number Diff line change 2222import java .util .Map ;
2323import java .util .function .Predicate ;
2424import java .util .stream .Stream ;
25+ import javax .ws .rs .NotAuthorizedException ;
2526import okhttp3 .Headers ;
2627import okhttp3 .OkHttpClient ;
2728import okhttp3 .Request ;
@@ -95,7 +96,7 @@ public Stream<SourceRecord> handleRequest() throws IOException {
9596 headers = response .headers ();
9697 ResponseBody body = response .body ();
9798 data = body != null ? body .bytes () : null ;
98- } catch (IOException ex ) {
99+ } catch (IOException | NotAuthorizedException ex ) {
99100 route .requestFailed (this , null );
100101 throw ex ;
101102 }
You can’t perform that action at this time.
0 commit comments