Skip to content

Commit

Permalink
Merge pull request #2 from yasmin-goncalves/main
Browse files Browse the repository at this point in the history
Issue #1
  • Loading branch information
matheus-rodriguesGN authored Nov 24, 2022
2 parents e1a05e6 + e3484b1 commit 7165200
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gerencianet/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func newAuth(clientID string, clientSecret string,CA string, Key string, sandbox

var cert, erro = tls.LoadX509KeyPair(CA, Key)
if erro != nil {
println("Here",erro)
println("Erro ao carregar par de chaves",erro)
}


Expand Down
2 changes: 1 addition & 1 deletion gerencianet/requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (requester requester) request(endpoint string, httpVerb string, requestPara
reqResp, _ := ioutil.ReadAll(res.Body)
response := string(reqResp)

if res.StatusCode != http.StatusOK {
if (res.StatusCode != http.StatusOK && res.StatusCode != http.StatusCreated) {
return "", errors.New(response)
}

Expand Down

0 comments on commit 7165200

Please sign in to comment.