Skip to content

Commit

Permalink
check eof
Browse files Browse the repository at this point in the history
  • Loading branch information
wistefan committed Jan 22, 2025
1 parent 580780f commit 9f88a93
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tir/tirClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package tir
import (
"encoding/json"
"errors"
"io"
"net/http"
"time"

Expand Down Expand Up @@ -150,6 +151,10 @@ func parseTirResponse(resp http.Response) (trustedIssuer TrustedIssuer, err erro
return trustedIssuer, ErrorTirEmptyResponse
}

body, _ := io.ReadAll(resp.Body)

logging.Log().Warnf("The body is %s", string(body))

err = json.NewDecoder(resp.Body).Decode(&trustedIssuer)
if err != nil {
logging.Log().Warn("Was not able to decode the tir-response.")
Expand Down

0 comments on commit 9f88a93

Please sign in to comment.