mnkhod
So i have been using ash framework for a while and i love it. However currently the issue im having with ash framework is the error handling side of things on LiveView.
I understand there is 4 main category on the error class which are forbidden/invalid/framework/unknown. This is great but the problem is having to manage more than 1 errors. I understand the use case that errors propogating and coming as a list is great but what if i wanna show only 1 error since my frontend toast can only show 1 error message and having multiple error message would ruin it. Hence is there any configuration on ash action that allows me to say if any error occur then send that error and stop the whole action?
Having this would allow my invoking of code interface inside case statement be more lean since i can just pattern match on 1 error message to show multiple possible errrors inside put_flash.
Having to pattern match on Ash.Error.Invalid errors list with Enum.find and match function is making me go crazy.
Isnt this more lean tho? pls let me know if im being dumb
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
zachdaniel
I might need to see some code examples of how exactly you’re using it in your LV, but in general you can do things like this just fine:
Ash itself doesn’t provide a way to just automatically stop on the first error and raise or return that, so whatever you do would need to be solved outside of the core calls.