Skip to content

Commit

Permalink
Fix director_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jhiemstrawisc committed Oct 4, 2023
1 parent a4cf83c commit 724a05b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/director.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package client

import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
Expand Down Expand Up @@ -159,6 +160,7 @@ func QueryDirector(source string, directorUrl string) (resp *http.Response, err
// Check HTTP response -- should be 307 (redirect), else something went wrong
body, _ := io.ReadAll(resp.Body)
if resp.StatusCode != 307 {
fmt.Printf("\n\n\nresp.StatusCode %d\n\n\n", resp.StatusCode)
var respErr directorResponse
if unmarshalErr := json.Unmarshal(body, &respErr); unmarshalErr != nil { // Error creating json
return nil, errors.Wrap(unmarshalErr, "Could not unmarshall the director's response")
Expand Down

0 comments on commit 724a05b

Please sign in to comment.