- Notifications
You must be signed in to change notification settings - Fork928
fix: Add isFirst check before err check#4326
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This was causing TestBlockNonBrowser to hang and fail.
Force merging this because CI is in shambles right now! |
if isFirst { | ||
if res.StatusCode == http.StatusConflict { | ||
iferr != nil &&res.StatusCode == http.StatusConflict { |
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.
Should this beerr == nil
? Thinking this will still have the potential nil pointer deref iferr != nil
?
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.
Ahh, you're correct. I'll fix this now in another PR. I merged due to panic ofmain
being busted!
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.
It seems the error isn't nil there actually, so a weird case. I'm just going to check for the status code, then it should be fine!
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.
This was causing TestBlockNonBrowser to hang and fail.