-
Notifications
You must be signed in to change notification settings - Fork 362
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
Better error message and support logs for /v3/service_offerings and plans #4213
base: main
Are you sure you want to change the base?
Conversation
@@ -1260,7 +1260,10 @@ def check_filtered_instances(*instances) | |||
expect(last_response).to have_status_code(422) | |||
expect(parsed_response['errors']).to include( | |||
include({ | |||
'detail' => 'Invalid service plan. Ensure that the service plan exists, is available, and you have access to it.', | |||
'detail' => 'Invalid service plan. This could be due to a space-scoped broker which is offering the service plan ' \ |
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.
Would be good to have the same tests for the update case (PATCH). If we had those, above bug which results in a 500 would have been detected.
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.
Good point, will add it
Users may be confused why they receive a 422 with error message "Invalid service plan. Ensure that the service plan exists, is available, and you have access to it." unprocessable_service_plan! when trying to create a service instance.
The root cause of this can have different origins:
A short explanation of the proposed change:
Split the error into different errors depending on the root cause. Error message will stay the same if user can not see the service plan in any org.
For case 1 and 2 error message will stay:
Invalid service plan. Ensure that the service plan exists, is available, and you have access to it.
For case 3 error message will now be:
Invalid service plan. The service plan 'service_plan' with guid 'some-guid' has been removed from the service broker's catalog. It is not possible to create new service instances using this plan.
For case 4 error message will now be:
Invalid service plan. Ensure that the service plan 'service_plan' with guid 'some-guid' is visible in your current space 'space' with guid 'some-guid'.
An explanation of the use cases your change solves
More fine granulated error messages, helping the user to solve the error better.
Links to any other associated PRs
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
main
branchI have run all the unit tests using
bundle exec rake
I have run CF Acceptance Tests