Skip to content

Commit

Permalink
feat: Updated the way we validate api response
Browse files Browse the repository at this point in the history
- For activate-certificate-authority and regenerate-certificates,
we are ignoring the 207 multi status warning message.

Co-authored-by: David Timm <[email protected]>
Co-authored-by: Ramkumar Vengadakrishnan <[email protected]>
  • Loading branch information
dtimm and ram-pivot committed Feb 3, 2023
1 parent f17b9ca commit 1d3c3b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/certificate_authorities_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (a Api) RegenerateCertificates() error {

defer resp.Body.Close()

if err = validateStatusOK(resp); err != nil {
if err = validateStatusOKOrVerificationWarning(resp, true); err != nil {
return err
}

Expand Down Expand Up @@ -130,7 +130,7 @@ func (a Api) ActivateCertificateAuthority(input ActivateCertificateAuthorityInpu

defer resp.Body.Close()

if err = validateStatusOK(resp); err != nil {
if err = validateStatusOKOrVerificationWarning(resp, true); err != nil {
return err
}

Expand Down

0 comments on commit 1d3c3b6

Please sign in to comment.