Closed MCBrandenburg closed 3 years ago
Yes, I meant to put this in the up in the status code check. I was testing and getting unmarshall errors and realized what I had done. This could also be changed to:
if resp.StatusCode < 200 || resp.StatusCode > 299 {
if err = json.NewDecoder(resp.Body).Decode(rc.ErrorRef); err == io.EOF {
err = nil
}
} else {
rc.ErrorRef = nil
if _, ok := rc.ResponseRef.(*BaseHTTPResponse); !ok {
if err = json.NewDecoder(resp.Body).Decode(rc.ResponseRef); err == io.EOF {
err = nil
}
}
}
Ok, got it. Yeah, if you want to submit another PR for additional handling that would be fine.
Is this just a correction from https://github.com/FusionAuth/fusionauth-client-builder/pull/22 ?