File tree Expand file tree Collapse file tree
util/src/main/java/io/kubernetes/client/informer/cache Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,10 +223,15 @@ private void watchHandler(Watchable<ApiType> watch) {
223223 continue ;
224224 }
225225 if (eventType .get () == EventType .ERROR ) {
226- String errorMessage =
227- String .format ("got ERROR event and its status: %s" , item .status .toString ());
228- log .error (errorMessage );
229- throw new RuntimeException (errorMessage );
226+ if (item .status != null && item .status .getCode () == HttpURLConnection .HTTP_GONE ) {
227+ log .info ("Watch connection expired: {}" , item .status .getMessage ());
228+ return ;
229+ } else {
230+ String errorMessage =
231+ String .format ("got ERROR event and its status: %s" , item .status .toString ());
232+ log .error (errorMessage );
233+ throw new RuntimeException (errorMessage );
234+ }
230235 }
231236
232237 ApiType obj = item .object ;
You can’t perform that action at this time.
0 commit comments