Fork me on GitHub
#fulcro
<
2023-12-06
>
Eric Dvorsak16:12:16

I am curious in fulcro when the server returns errors what happens in the frontend? For me nothing but I suspect it's broken because I use pathom3 and it has different keys for errors?

tony.kay17:12:43

So, because the remotes are pluggable, and ppl may have different ways of handling errors (exceptions, return values, etc.) For example on some of my apps I show a toast when a low-level error occurs. How would I do that generically? I’d have to assume you’re targeting the web (or native?), I’d have to know what language you’re speaking, etc. So, error handling is pretty easy to plug in at various layers: The “definition” of an error (e.g. remote-error? option), response middleware in the fulcro http remote, etc. But since you’re also building the server, you have to decide what constitutes an error. So yeah, Fulcro has a very “light” opinion on the details of “errors”