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

Improve Scenario error message for unsupported state #2594

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

nlisgo
Copy link
Contributor

@nlisgo nlisgo commented Jan 27, 2024

Update the error message in 'setState' method of 'Scenario' class to contain the name of the scenario instead of 'my-scenario'. This makes the error message more informative and useful.

References

  • TODO

Submitter checklist

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@nlisgo nlisgo requested a review from a team as a code owner January 27, 2024 22:48
Update the error message in 'setState' method of 'Scenario' class to contain the name of the scenario instead of 'my-scenario'. This makes the error message more informative and useful.
@nlisgo nlisgo force-pushed the id-in-non-existent-scenario-state branch from c5bdac2 to c416232 Compare January 27, 2024 23:11
@leeturner leeturner self-assigned this Jan 30, 2024
@leeturner
Copy link
Contributor

Hi. Nice catch on this one. I see that all the tests passed before because they used my-scenario as the name of the scenario 👍

Would you be able to run the spotless task so we can get the formatting issues sorted and then we can merge it in.

Really appreciate your contribution

@nlisgo
Copy link
Contributor Author

nlisgo commented Jan 30, 2024

I see that all the tests passed before because they used my-scenario as the name of the scenario 👍

I did consider amending the test so that was made clear but I thought I would leave that decision to you.

Would you be able to run the spotless task so we can get the formatting issues sorted and then we can merge it in.

I have run ./gradlew :spotlessApply

🤞 for a green run.

This error wasn't too misleading but thought I would be a good citizen and help with this small contribution. We have benefitted massively from this service. Happy to help in a small way.

@nlisgo
Copy link
Contributor Author

nlisgo commented Feb 2, 2024

@leeturner thanks so much for the review. I believe this is ready to be merged now.

@nlisgo
Copy link
Contributor Author

nlisgo commented Feb 5, 2024

I'm not a java developer. I would appreciate some guidance here. I'm not sure if these failures are related to the small change I have made or not.

@leeturner
Copy link
Contributor

Hi @nlisgo No worries. Not related to your change. All the checks have passed now. All good to merge

@leeturner leeturner merged commit 752e681 into wiremock:master Feb 5, 2024
7 checks passed
@nlisgo nlisgo deleted the id-in-non-existent-scenario-state branch February 5, 2024 23:57
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

Successfully merging this pull request may close these issues.

None yet

2 participants