From 4fc39e56e24dca6df06cb1cb9273b0ea0e5fd4b6 Mon Sep 17 00:00:00 2001 From: otaxhu Date: Fri, 8 Nov 2024 11:35:24 -0400 Subject: [PATCH] fix: remove duplication of p.setStatus --- problem.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/problem.go b/problem.go index 8fd1399..9db857f 100644 --- a/problem.go +++ b/problem.go @@ -116,8 +116,6 @@ 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) @@ -125,9 +123,9 @@ func ParseResponseCustom(res *http.Response, p Problem) error { return err } - p.setStatus(res.StatusCode) - } + p.setStatus(res.StatusCode) + return nil }