Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Different error messages for related resource save fails #59

Open
eltiare opened this Issue Sep 14, 2012 · 0 comments

Comments

Projects
None yet
1 participant

eltiare commented Sep 14, 2012

I have this setting enabled: DataMapper::Model.raise_on_save_failure = true

Spent several hours on a problem today whereby a resource wasn't saving and I couldn't figure out why. Turns out a parent resource was have some validation troubles (thanks to a custom validation gone bad) but the only error I got was "DataMapper was unable to save the resource" or some jazz like that. I think it would be supremely useful if a validation save aborts due to a related resource validation failure that a different error be thrown which lists the offending resource. Could save other developers a ton of time and also hair from being pulled out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment