-
Notifications
You must be signed in to change notification settings - Fork 904
fix(organization_ruleset): handle other error responses #2705
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
base: main
Are you sure you want to change the base?
Conversation
diofeher
left a comment
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.
@skeggse Could you please add more context to the pull request's description about how you've fixed the problem and include an automated test demonstrating how this new functionality is expected to resolve the issue linked on the PR?
|
@diofeher Due to the length of time it has taken to get this in, I'll step in and complete the PR description. After running some local tests this is what I came up with: If an error occurs that is NOT a Not return from the function and continue executing and try to access |
|
@nickfloyd Would there be any value in having some kind of regression test for that scenario? Maybe it could be used in the future to ensure other resources don't end up in a similar situation? |
Resolves #2450
Before the change?
If an error occurs that is NOT a
github.ErrorResponseor is agithub.ErrorResponsewith a status code other than304or404the current implementation will:Not return from the function and continue executing and try to access
resp.Headerandruleset.Name. Since bothrespandrulesetare nil when there's an error we get aSIGSEGVAfter the change?
Pull request checklist
Does this introduce a breaking change?