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].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to