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

Show the type of field that violated a uniqueness constraint #1205

Merged
merged 2 commits into from
May 20, 2018

Conversation

AndrewRayCode
Copy link
Contributor

When generating a factorybot item that has several fields with unique constraints, if it errors, there's no way to know what violated the constraint

@@ -16,7 +16,7 @@ def method_missing(name, *arguments)
return result
end

raise RetryLimitExceeded
raise RetryLimitExceeded, "Retry limit exceeded for #{name}"
Copy link
Member

@vbrazo vbrazo May 12, 2018

Choose a reason for hiding this comment

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

@AndrewRayCode thanks for contributing 🥇

Could you write/modify the specs to make sure that this description is working properly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@vbrazo vbrazo left a comment

Choose a reason for hiding this comment

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

👍

@vbrazo vbrazo force-pushed the master branch 2 times, most recently from 1dbe328 to e1e54c6 Compare May 20, 2018 02:35
@vbrazo vbrazo merged commit a44c017 into faker-ruby:master May 20, 2018
@AndrewRayCode AndrewRayCode deleted the show-type branch May 23, 2018 22:49
@vbrazo vbrazo self-requested a review July 19, 2018 01:37
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
…uby#1205)

* Show the type of field that violated a uniqueness constraint

* Adding spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants