Skip to content

Commit

Permalink
Merge pull request #15 from ConductorOne/mchavez-baton-cloudflare-cod…
Browse files Browse the repository at this point in the history
…e-review

code review changes @coderabbitai
  • Loading branch information
ggreer authored Aug 1, 2024
2 parents ad2e0e8 + fb2a008 commit f0595ab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/connector/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"slices"
Expand Down Expand Up @@ -329,7 +330,13 @@ func (r *roleResourceType) UpdateAccountMember(ctx context.Context, accountID, m
}
if resp != nil {
ce.ErrorCode = resp.StatusCode
ce.ErrorSummary = fmt.Sprint(resp.Body)
bodyBytes, err := io.ReadAll(resp.Body)
if err != nil {
ce.ErrorSummary = fmt.Sprintf("Error reading response body %s", err.Error())
return nil, ce
}

ce.ErrorSummary = string(bodyBytes)
}

return nil, ce
Expand Down

0 comments on commit f0595ab

Please sign in to comment.