Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

prevent nil pointer exception when pilosa cluster does not exist #255

Merged
merged 2 commits into from
Oct 16, 2019

Conversation

travisturner
Copy link
Member

No description provided.

client.go Outdated
if resp != nil {
statusCode = resp.StatusCode
}
c.logger.Printf("request failed with: %v status: %d, retrying after %d more time(s) after %v ", err, statusCode, tries, sleepTime)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're here anyway:

Suggested change
c.logger.Printf("request failed with: %v status: %d, retrying after %d more time(s) after %v ", err, statusCode, tries, sleepTime)
c.logger.Printf("request failed with: %v status: %d, retrying %d more time(s) after %v ", err, statusCode, tries, sleepTime)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quote the '%v' before status as well... that is really confusing — it makes it look the error message ends with the word "status".

(I wrote this code)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made those changes

Copy link
Contributor

@alanbernstein alanbernstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a wording suggestion for that error message, because it always bothers me

@travisturner travisturner merged commit b8f364f into FeatureBaseDB:master Oct 16, 2019
@travisturner travisturner deleted the nil-pointer branch October 16, 2019 21:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants