abreujp
Learning Elixir: Error Handling Basics
I’ve published a new article in my Elixir learning series on dev.to exploring error handling with tagged tuples - the {:ok, value} / {:error, reason} pattern that’s idiomatic to Elixir.
The article covers:
- Understanding the tagged tuple convention and when to use it
- Returning descriptive results from your functions
- Handling errors at the call site with
caseand pattern matching - Chaining operations cleanly with
withand theelseclause - The bang convention (
!) and its role in the ecosystem - Practical patterns: validation, form handling, and batch processing
With complete working examples you can copy into IEx, you’ll learn how to treat errors as values and write code that handles failure paths explicitly.
Check it out:
Popular in Blog Posts
Hello everyone, I just published my first blog post ever.
I am learning Elixir, OTP & Phoenix and wanted to start a blog for a while...
New
So you’re enjoying using WebSockets with Elixir’s Phoenix Framework, and you want to send some binary messages. Maybe it’s an audio clip,...
New
I had a bit of a mini-adventure following Sobelow’s advice on adding a CSP to a Phoenix App. If you want to follow along, or want to add ...
New
What I genuinely value at my workplace is that I can easily explore new languages through internal mobility. Throughout my career within ...
New
Add drag-and-drop functionality to your Phoenix LiveView app with SortableJS and LiveView Hooks! This posts shows you how to create an in...
New
Hi folks, I wrote a blog post the other day on how I built my MVP in 3 months whilst having a day job, using Elixir/Phoenix/LiveView.
Th...
New
Just wrote a new blog post about how to deploy a Phoenix app using Kamal 2. Check it out and let me know what do you think:
https://blog...
New
Other popular topics
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
Hello!
tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability.
After spen...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










