Make kubectl errors even more user-friendly
Omit glog prefix when v < 2, show multiline errors for configuration problems, add new generic messages for server errors that hide some complexity that is not relevant for users.
This commit is contained in:
@@ -251,7 +251,7 @@ func TestTransformResponse(t *testing.T) {
|
||||
},
|
||||
Error: true,
|
||||
ErrFn: func(err error) bool {
|
||||
return err.Error() == "aaaaa" && apierrors.IsUnauthorized(err)
|
||||
return strings.Contains(err.Error(), "server has asked for the client to provide") && apierrors.IsUnauthorized(err)
|
||||
},
|
||||
},
|
||||
{Response: &http.Response{StatusCode: 403}, Error: true},
|
||||
|
Reference in New Issue
Block a user