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

Add fall through case to deprovision handler #700

Merged
merged 1 commit into from Jan 29, 2018
Merged

Add fall through case to deprovision handler #700

merged 1 commit into from Jan 29, 2018

Conversation

philipgough
Copy link
Contributor

Describe what this PR does and why we need it:

Adds a default error to deprovision handler

Changes proposed in this pull request

  • Return a 500 status code as a fallback

Which issue this PR fixes (This will close that issue when PR gets merged)
fixes #698

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 29, 2018
@@ -443,6 +443,8 @@ func (h handler) deprovision(w http.ResponseWriter, r *http.Request, params map[
case broker.ErrorDeprovisionInProgress:
writeResponse(w, http.StatusAccepted, broker.DeprovisionResponse{})
return
default:
writeResponse(w, http.StatusInternalServerError, broker.ErrorResponse{Description: err.Error()})
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you also need a return after you respond with the error.

Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

ACK

@eriknelson
Copy link
Contributor

Thank you @philipgough!

@eriknelson eriknelson merged commit 367f2a6 into openshift:master Jan 29, 2018
@philipgough philipgough deleted the deprovsion-handler-err-fallback branch January 29, 2018 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deprovision handler is missing fall-through case
5 participants