Skip to content

Wrap action errors in controller#1049

Closed
ablease wants to merge 6 commits into
cloudfoundry:masterfrom
cloudfoundry-incubator:pr-service-instance-sharing-api-errors-in-sharing-action
Closed

Wrap action errors in controller#1049
ablease wants to merge 6 commits into
cloudfoundry:masterfrom
cloudfoundry-incubator:pr-service-instance-sharing-api-errors-in-sharing-action

Conversation

@ablease

@ablease ablease commented Jan 2, 2018

Copy link
Copy Markdown

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::ApiError errors.

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 master branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

Samze and others added 3 commits December 27, 2017 12:55
[#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>
@cfdreddbot

Copy link
Copy Markdown

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.

@cf-gitbot

Copy link
Copy Markdown

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.

@ablease ablease force-pushed the pr-service-instance-sharing-api-errors-in-sharing-action branch from e70bae6 to db83747 Compare January 2, 2018 13:42
@Samze Samze force-pushed the pr-service-instance-sharing-api-errors-in-sharing-action branch from db83747 to b9b3efc Compare January 3, 2018 16:34
[#154047687]

Signed-off-by: Denise Yu <dyu@pivotal.io>
@ablease ablease force-pushed the pr-service-instance-sharing-api-errors-in-sharing-action branch from b9b3efc to cd1cbb7 Compare January 4, 2018 10:37
[#153639192]

Signed-off-by: Alex Blease <ablease@pivotal.io>
@ablease ablease force-pushed the pr-service-instance-sharing-api-errors-in-sharing-action branch from cd1cbb7 to e2400b9 Compare January 4, 2018 10:40
[#153639192]

Signed-off-by: Denise Yu <dyu@pivotal.io>
@ablease ablease closed this Jan 4, 2018
@deniseyu deniseyu deleted the pr-service-instance-sharing-api-errors-in-sharing-action branch January 23, 2018 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants