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
Hi, I recently thought about a name for this Stack: Rust + Elixir + Phoenix. I came up with Runix (RuNix) and blogged about it on Medium....
New
https://medium.com/@jpiepkow/distributed-state-is-hard-5a0d384c2f3c
New
Somebody was asking about Erlang OS signal handling on Slack; I’ve posted up my learnings:
https://medium.com/@ellispritchard/graceful-s...
New
We all have varying degrees of exposure to Big Tech. Some of it seems fine, stable and can be relied on. Some of it feels like shifting s...
New
Hi there!
Recently I was playing around with extracting and updating data in the DB and for fun challenged myself to try to implement a ...
New
https://medium.com/the-realreal-product-tech-blog/monitoring-hackney-connection-pools-with-telemetry-3aaeafa8eeb8
Hi, everyone! In this ...
New
In this series, we take a look at the different ways to organize, structure and execute a good “flow” in our Elixir programs.
The latest...
New
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
Hi! :waving_hand:
I wanted to refresh my knowledge on how to mix phx.gen.auth with local password users db, as well as OAuth providers s...
New
Just finished doing a clean install of macOS (which I highly recommend btw!) and have updated my macOS Ruby & Elixir/Erlang dev env s...
New
Other popular topics
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
Phoenix 1.4.0 released
Phoenix 1.4 is out! This release ships with exciting new features, most notably
with HTTP2 support, improved deve...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
Hi everyone,
One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Update:
How to use the Blogs & Podcasts section
You can post links to your blog posts or podcasts either in one of the Official Blog...
New
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something…
Haskell reminds me of Java, and e...
New









