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

Bad association leads to incomprehensible error message #20

Open
mmower opened this issue Sep 13, 2014 · 1 comment
Open

Bad association leads to incomprehensible error message #20

mmower opened this issue Sep 13, 2014 · 1 comment
Assignees
Labels

Comments

@mmower
Copy link

mmower commented Sep 13, 2014

Hi Jon.

Upmin looks very good but can I suggest adding a model-association validation phase? Because right now Upmin is very brittle around errors in the code.

I had two associations in my app code that were invalid. They both broke Upmin, the second with a pretty incomprehensible stack trace (https://gist.githubusercontent.com/mmower/b8697b6f1bd8889da09b/raw/aeb4c369bb12d3ad72084d510afcc5d173d038f9/gistfile1.txt)

It's not Upmin's fault that I had bad code in my app (one was an association that was no longer present but still declared, one was an association with the wrong name) but it would have been better if, instead of blowing up on messaging nil, it could have told me:

"Project#users relationship is bad"

Since Upmin is likely to depend on the applications models & relationships being valid for its operation a belt & braces check of each may be no bad thing.

Kind regards,

Matt

@joncalhoun joncalhoun added the bug label Sep 13, 2014
@joncalhoun
Copy link
Member

Hi Matt,

Thanks for the feedback, and I completely agree upmin-admin needs to be a lot less brittle with errors, and I appreciate you pointing out this bug so I can fix it up.

The stack trace is (oddly) useful for me, so thanks for providing it. Is it possible to get an example of what you mean by "an association with the wrong name"? I know what you mean by one no longer being present, but I am not 100% certain on the wrong name one and I would like to make sure it gets tested as well.

Thanks,
JOn

@joncalhoun joncalhoun modified the milestones: Version 1.0, v0.0.40 Release Sep 17, 2014
@joncalhoun joncalhoun self-assigned this Sep 21, 2014
@joncalhoun joncalhoun modified the milestones: v0.0.40 Release, v0.0.41 Release Sep 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants