Skip to content

Commit

Permalink
fix: remove duplication of p.setStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
otaxhu committed Nov 8, 2024
1 parent d2244e7 commit 4fc39e5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions problem.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,16 @@ func ParseResponseCustom(res *http.Response, p Problem) error {
return err
}

p.setStatus(res.StatusCode)

} else if contentType == problemXmlContentType {

err := xml.NewDecoder(res.Body).Decode(p)
if err != nil {
return err
}

p.setStatus(res.StatusCode)

}

p.setStatus(res.StatusCode)

return nil
}

0 comments on commit 4fc39e5

Please sign in to comment.