You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfalse, volumeAttachment, fmt.Errorf("attachment failed for server with id %s and volume with id %s, the response is not valid: the volume id is missing", serverId, volumeId)
247
+
}
248
+
if*volumeAttachment.VolumeId==volumeId {
249
+
returntrue, volumeAttachment, nil
250
+
}
251
+
}
252
+
returnfalse, nil, nil
253
+
}
254
+
oapiErr, ok:=err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped
255
+
if!ok {
256
+
returnfalse, volumeAttachment, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err)
257
+
}
258
+
ifoapiErr.StatusCode!=http.StatusNotFound {
259
+
returnfalse, volumeAttachment, err
260
+
}
261
+
returnfalse, nil, nil
262
+
})
263
+
handler.SetTimeout(10*time.Minute)
264
+
returnhandler
265
+
}
266
+
267
+
// RemoveVolumeFromServerWaitHandler will wait for a volume to be attached to a server
returnfalse, volumeAttachment, fmt.Errorf("remove volume failed for server with id %s and volume with id %s, the response is not valid: the volume id is missing", serverId, volumeId)
275
+
}
276
+
}
277
+
returnfalse, nil, nil
278
+
}
279
+
oapiErr, ok:=err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped
280
+
if!ok {
281
+
returnfalse, volumeAttachment, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError: %w", err)
0 commit comments