Skip to content

Commit

Permalink
Updated returned error message
Browse files Browse the repository at this point in the history
  • Loading branch information
casey-tran committed Feb 21, 2025
1 parent d16fe2d commit 30daef8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/sources/postman/postman_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,11 @@ func (c *Client) EnumerateWorkspaces(ctx context.Context) ([]Workspace, error) {
for i, workspace := range workspacesObj.Workspaces {
tempWorkspace, err := c.GetWorkspace(ctx, workspace.ID)
if err != nil {
err = fmt.Errorf("could not get workspace during enumeration: %s (%s)", workspace.Name, workspace.ID)
return nil, err
} else {
workspacesObj.Workspaces[i] = tempWorkspace
return nil, fmt.Errorf("could not get workspace %q (%s) during enumeration: %w", workspace.Name, workspace.ID, err)
}
ctx.Logger().V(3).Info("individual workspace getting added to the array", "workspace", workspacesObj.Workspaces[i])
workspacesObj.Workspaces[i] = tempWorkspace

ctx.Logger().V(3).Info("individual workspace getting added to the slice", "workspace", workspacesObj.Workspaces[i])
}

return workspacesObj.Workspaces, nil
Expand Down

0 comments on commit 30daef8

Please sign in to comment.