-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add logging to NGINX API http requests #605
Conversation
✅ Deploy Preview for agent-public-docs canceled.
|
return false | ||
} | ||
|
||
// Expecting API to return the api versions in an array of positive integers | ||
// subset example: [ ... 6,7,8,9 ...] | ||
var responseBody []int | ||
err = json.Unmarshal(bodyBytes, &responseBody) | ||
if err != nil { | ||
log.Debugf("Unable to unmarshal NGINX Plus API response body: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a warning?
sdk/config_helpers.go
Outdated
return false | ||
} | ||
|
||
bodyBytes, err := io.ReadAll(resp.Body) | ||
if err != nil { | ||
log.Debugf("Unable to read Stub Status API response body: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a warning?
sdk/config_helpers.go
Outdated
resp, err := client.Get(statusAPI) | ||
if err != nil { | ||
log.Debugf("Unable to create client for Stub Status API request: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a warning?
Proposed changes
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)