File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 9898 http .StatusBadRequest : codes .InvalidArgument ,
9999 http .StatusTooManyRequests : codes .ResourceExhausted ,
100100 http .StatusNotFound : codes .NotFound ,
101+ http .StatusConflict : codes .FailedPrecondition ,
101102 }
102103
103104 // Regular expressions for validating parent_id, key and value of a resource tag.
Original file line number Diff line number Diff line change @@ -1241,6 +1241,14 @@ func TestCodeForError(t *testing.T) {
12411241 }),
12421242 expCode : codes .NotFound ,
12431243 },
1244+ {
1245+ name : "googleapi.Error that wraps apierror.APIError of http kind status conflict" ,
1246+ inputErr : getGoogleAPIWrappedError (& googleapi.Error {
1247+ Code : 409 ,
1248+ Message : "status conflict error" ,
1249+ }),
1250+ expCode : codes .FailedPrecondition ,
1251+ },
12441252 {
12451253 name : "googleapi.Error that wraps apierror.APIError of status kind" ,
12461254 inputErr : getGoogleAPIWrappedError (status .New (
You can’t perform that action at this time.
0 commit comments