graphiti-api / graphiti-rails

MIT License
54 stars 28 forks source link

Possibly handle Graphiti::Errors::SingularSideload specially #16

Closed wagenet closed 5 years ago

wagenet commented 5 years ago

Per @wadetandy, this would ideally be rolled up into InvalidRequest though it may be harder to do. If it isn't rolled up soon we probably want to add the handler for it.

richmolj commented 5 years ago

I'm not sure. On the one hand, you can get this error my making an invalid request (e.g. hitting index and trying to sideload something marked single: true). On the other hand, you can get this error with unexpected/poor data modeling - an example is the Faux Has One, though I've also seen it when our DB views weren't generating the results we thought they were 😬

wagenet commented 5 years ago

@richmolj so do you recommend that we do handle it explicitly? It's not a big deal to me either way, just want to know what makes sense on your end.

richmolj commented 5 years ago

I don't think it's worth rolling into InvalidRequest, so seems best to handle explicitly.