Open catmando opened 6 years ago
so works as described above...
specifically params will look like this:
'acting_user' => # current acting user,
'controller' => # the controller the request came in on (so you can poke at session etc)
'pending_fetches' => # i.e. the graph to fetch - note this is subject to change
[['TodoItem', ['find_by', { 'id' => 2 }], 'comments', '*count']],
'models' => [], i.e. a list of models that have currently changed on the client
'associations' => [], i.e. a list of related associations
should be documented somewhere
Could I suggest not printing the controller param? It may be useful to have, but the error Hyperloop logs is now massive and hard to scroll up to find the actual error. Overriding full_message
might do it.
I see several different error classes across the gems, e.g. Hyperloop::AccessViolation
and ReactiveRecord::AccessViolation
. It would be useful if they all shared a parent class e.g. HyperloopError
rather than inheriting from StandardError
.
@sfcgeorge I cannot reproduce having the controller dumped anywhere. Can you show me how to reproduce?
@catmando Looks like this in the Rails server log (note this goes on a loooong way further scrolling up):
When an execute_remote fails it looks like that for me now. This is when it was an exception rather than a validation error.
the above issue about the log has been closed in hyper-operation... thanks for the heads up @sfcgeorge
so that for debug, logging, etc purposes you can define it yourself.