Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The private getForEntity function behavior has changed. #104

Open
ToDMSmith opened this issue Sep 8, 2024 · 0 comments
Open

The private getForEntity function behavior has changed. #104

ToDMSmith opened this issue Sep 8, 2024 · 0 comments

Comments

@ToDMSmith
Copy link

We recently upgraded to the Aug 2024 version of the library. Previously, we were using the Sep 2023 build. After upgrading we are noticing API behaviour changes.

When calling sys.go GetCertificate(name string) -- with a name that does not exist -- the code in getForEntity will return a 404 as no error (e.g. nil) and false.

However, the code now returns error and false which causes GetCertificate (and others) to return the error instead of nil.

Current Version in bigip.go
resp, err := b.APICall(req) if err != nil { var reqError RequestError json.Unmarshal(resp, &reqError) if reqError.Code == 404 { return err, false } return err, false }

Previous Version
resp, err := b.APICall(req) if err != nil { var reqError RequestError json.Unmarshal(resp, &reqError) if reqError.Code == 404 { return nil, false } return err, false }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant