Hi David, Thanks for letting me know!
In the future, should I expect a server-side mutation function to have the capability of updating client-side state? Max > On Jun 5, 2016, at 12:01, David Nolen <[email protected]> wrote: > > There's some work still in progress in om.next master around the error > handling story. For the time being you'll have to sort something out > yourself, but the idea is that error handling will eventually be a first > class feature. > > David > > On Sun, Jun 5, 2016 at 12:46 PM, Max Countryman <[email protected] > <mailto:[email protected]>> wrote: > Hi, > > I’m curious about the preferred method for communicating errors occurring in > a backend mutation function. > > For example, say we have some input from a frontend form that we need to > validate on the backend when we submit this form. We have a mutation function > which carries out form input state to the backend, where we have a backend > mutation function—this backend mutator checks some state and if all is well > does something (maybe it’s updating our persistence layer, for instance) > otherwise it returns an error telling us what went wrong. My expectation > originally was that the value of this backend mutation function would be > associated back into my global app state, on the frontend. However this does > not appear to be the case and so it would seem I need to write a reader > function just to get this error state—if so this seems awkward and > inefficient since it implies a second roundtrip. What’s the best way of doing > something like this? > > Please bear in mind I’m relatively new to Om and Om Next—I’m quite likely > overlooking and misunderstanding things here so any advice is appreciated! > > Thanks, > > > Max > > -- > Note that posts from new members are moderated - please be patient with your > first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:clojurescript%[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/clojurescript > <https://groups.google.com/group/clojurescript>. > > > -- > Note that posts from new members are moderated - please be patient with your > first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/clojurescript > <https://groups.google.com/group/clojurescript>. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/clojurescript.
