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

Missing check for error in client.go #177

Closed
NautiluX opened this issue Oct 11, 2019 · 1 comment
Closed

Missing check for error in client.go #177

NautiluX opened this issue Oct 11, 2019 · 1 comment

Comments

@NautiluX
Copy link

Bug description

If this function call returns an error (I accidentally added a newline character to the end of the escalation policy id when called from GetEscalationPolicy), the call in the following line may result in a crash as req.Header may be nil.

However, if nil would be returned in case of an error to GetEscalationPolicy, this defer results in a crash as res.Body will be nil as well.

Expected behaviour

Erroneous input shouldn't result in a crash but the error being returned to the user.

@theckman
Copy link
Collaborator

theckman commented Feb 20, 2021

This should have been fixed via #266, and should eventually be in v1.4.0+

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

2 participants