File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
main/java/io/kubernetes/client/util/generic
test/java/io/kubernetes/client/util/generic Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ public boolean isSuccess() {
59
59
*/
60
60
public KubernetesApiResponse <DataType > throwsApiException () throws ApiException {
61
61
return onFailure (
62
- errorStatus -> {
63
- throw new ApiException (errorStatus .toString ());
62
+ ( code , errorStatus ) -> {
63
+ throw new ApiException (code , errorStatus .toString ());
64
64
});
65
65
}
66
66
@@ -74,12 +74,12 @@ public KubernetesApiResponse<DataType> throwsApiException() throws ApiException
74
74
public KubernetesApiResponse <DataType > onFailure (ErrorStatusHandler errorStatusHandler )
75
75
throws ApiException {
76
76
if (!isSuccess ()) {
77
- errorStatusHandler .handle (this .status );
77
+ errorStatusHandler .handle (this .getHttpStatusCode (), this . status );
78
78
}
79
79
return this ;
80
80
}
81
81
82
82
public interface ErrorStatusHandler {
83
- void handle (V1Status errorStatus ) throws ApiException ;
83
+ void handle (int code , V1Status errorStatus ) throws ApiException ;
84
84
}
85
85
}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ public void testErrorStatusHandler() throws ApiException {
55
55
podClient
56
56
.delete ("default" , "foo" )
57
57
.onFailure (
58
- errStatus -> {
58
+ ( code , errStatus ) -> {
59
59
catched .set (true );
60
60
})
61
61
.getObject ());
You can’t perform that action at this time.
0 commit comments