Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Different error messages for related resource save fails #59

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

Different error messages for related resource save fails #59

eltiare opened this issue Sep 14, 2012 · 0 comments

Comments

@eltiare
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant