Wrap action errors in controller#1049
Closed
ablease wants to merge 6 commits into
Closed
Conversation
[#152552023] Signed-off-by: Alex Blease <ablease@pivotal.io>
[#152552021] Signed-off-by: Denise Yu <dyu@pivotal.io>
[#153739127] Signed-off-by: Alex Blease <ablease@pivotal.io>
|
Hey ablease! Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA. |
|
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/153989568 The labels on this github issue will be updated when the story is started. |
e70bae6 to
db83747
Compare
db83747 to
b9b3efc
Compare
[#154047687] Signed-off-by: Denise Yu <dyu@pivotal.io>
b9b3efc to
cd1cbb7
Compare
[#153639192] Signed-off-by: Alex Blease <ablease@pivotal.io>
cd1cbb7 to
e2400b9
Compare
[#153639192] Signed-off-by: Denise Yu <dyu@pivotal.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses some feedback from @Gerg that was made on PR #1006, specifically the comments here
NOTE: This PR builds on top of #1048, which should be merged first. The actual changes on top of #1048 can be viewed in this diff.
What
A pattern that we have been using for our actions is to raise a custom error class with a message and then wrap them all as unprocessable at the controller layer:
This Pr adopts a pattern in the service instance share action that raises a custom error class with a message, and then wraps these errors as unprocessable in the controller layer.
As a result of this refactor we have reduced the number of
CloudController::Errors::ApiErrorerrors.PR
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
masterbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests