Skip to content

Commit ddac226

Browse files
committed
better failure handling
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
1 parent 463ca21 commit ddac226

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/KubernetesClient/Watch.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,10 @@ private function preProcessResponse($response)
607607
return 1;
608608
}
609609

610+
if (key_exists('kind', $response) && $response['kind'] == 'Status' && $response['status'] == 'Failure') {
611+
return 1;
612+
}
613+
610614
// resourceVersion is too old
611615
if ($response['type'] == 'ERROR' && $response['object']['code'] == 410) {
612616
return 1;

0 commit comments

Comments
 (0)