We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a3c1127 + d1022f8 commit 1990033Copy full SHA for 1990033
pkg/gce-cloud-provider/compute/gce-compute.go
@@ -978,6 +978,7 @@ func codeForGCEOpError(err computev1.OperationErrorErrors) codes.Code {
978
"REGION_QUOTA_EXCEEDED": codes.ResourceExhausted,
979
"RATE_LIMIT_EXCEEDED": codes.ResourceExhausted,
980
"INVALID_USAGE": codes.InvalidArgument,
981
+ "UNSUPPORTED_OPERATION": codes.InvalidArgument,
982
}
983
if code, ok := userErrors[err.Code]; ok {
984
return code
pkg/gce-cloud-provider/compute/gce-compute_test.go
@@ -162,7 +162,7 @@ func TestCodeForGCEOpError(t *testing.T) {
162
{
163
name: "UNSUPPORTED_OPERATION error",
164
inputErr: computev1.OperationErrorErrors{Code: "UNSUPPORTED_OPERATION"},
165
- expCode: codes.Internal,
+ expCode: codes.InvalidArgument,
166
},
167
168
0 commit comments