Skip to content

Commit

Permalink
Remove commented error and cleanup spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
jhiemstrawisc authored Oct 3, 2023
1 parent 655c816 commit 975e0e8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions origin_ui/advertise.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,11 @@ func AdvertiseOrigin() error {

body, _ = io.ReadAll(resp.Body)
if resp.StatusCode > 299 {
// return fmt.Errorf("Error response %v from director registration: %v", resp.StatusCode, resp.Status)

var respErr directorResponse
if unmarshalErr := json.Unmarshal(body, &respErr); unmarshalErr != nil { // Error creating json
return errors.Wrapf(unmarshalErr, "Could not unmarshall the director's response, which responded %v from director registration: %v", resp.StatusCode, resp.Status)
}
return errors.Errorf("Error during director registration: %v\n", respErr.Error)

}

return nil
Expand Down

0 comments on commit 975e0e8

Please sign in to comment.