File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
pkg/gce-cloud-provider/compute Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1244,6 +1244,7 @@ func codeForGCEOpError(err computev1.OperationErrorErrors) codes.Code {
12441244 "RATE_LIMIT_EXCEEDED" : codes .ResourceExhausted ,
12451245 "INVALID_USAGE" : codes .InvalidArgument ,
12461246 "UNSUPPORTED_OPERATION" : codes .InvalidArgument ,
1247+ "RESOURCE_OPERATION_RATE_EXCEEDED" : codes .ResourceExhausted ,
12471248 }
12481249 if code , ok := userErrors [err .Code ]; ok {
12491250 return code
Original file line number Diff line number Diff line change @@ -164,6 +164,11 @@ func TestCodeForGCEOpError(t *testing.T) {
164164 inputErr : computev1.OperationErrorErrors {Code : "UNSUPPORTED_OPERATION" },
165165 expCode : codes .InvalidArgument ,
166166 },
167+ {
168+ name : "RESOURCE_OPERATION_RATE_EXCEEDED error" ,
169+ inputErr : computev1.OperationErrorErrors {Code : "RESOURCE_OPERATION_RATE_EXCEEDED" },
170+ expCode : codes .ResourceExhausted ,
171+ },
167172 }
168173
169174 for _ , tc := range testCases {
You can’t perform that action at this time.
0 commit comments