Skip to content

Commit fe81fdc

Browse files
Cocossoulsleungcy
andauthored
match exact error
Co-authored-by: Sam Leung <[email protected]>
1 parent 3407004 commit fe81fdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloudfoundry/resource_cf_route_service_binding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func upgradeStateRouteServiceBindingStateV0toV1ChangeID(ctx context.Context, raw
187187
routeBinding, err := session.ClientGo.ServiceRouteBindings.Single(context.Background(), options)
188188

189189
if err != nil {
190-
if strings.Contains(err.Error(), "expected exactly 1 result, but got less or more than 1") {
190+
if err == client.ErrExactlyOneResultNotReturned {
191191
rawState["id"] = ""
192192
return rawState, nil
193193
}

0 commit comments

Comments
 (0)