File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
util/src/main/java/io/kubernetes/client/util/generic Expand file tree Collapse file tree 1 file changed +4
-4
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
}
You can’t perform that action at this time.
0 commit comments