// listInterconnections lists all interconnections for the organization.
func (c *Client) listInterconnections(ctx context.Context) ([]metal.Interconnection, error) {
// List organization interconnections
interconnections, _, err := c.Client.InterconnectionsApi.OrganizationListInterconnections(ctx, c.OrganizationID).Execute()
if err != nil {
return nil, errors.New(errors.ErrorTypeInternal, "failed to list interconnections").WithRawError(err).WithLog()
}
return interconnections.GetInterconnections(), nil
}
throws:
"data failed to match schemas in oneOf(InterconnectionFabricProvider)"